def combine(self, valA, valB): """\ Returns result of (valA == valB) Reimplement this method to change the type of comparison from equality testing. """ return valA == valB def mainBody(self): """Main loop body.""" if self.dataReady("inA") and self.dataReady("inB"): self.send(self.combine(self.recv("inA"),self.recv("inB"))) if self.dataReady("control"): mes = self.recv("control") if isinstance(mes, shutdownMicroprocess) or isinstance(mes,producerFinished): self.send(producerFinished(), "signal") return 0 return 1 import Kamaelia.Support.Deprecate as Deprecate comparator = Deprecate.makeClassStub( Comparator, "Use Kamaelia.Util.Comparator:Comparator instead of Kamaelia.Util.Comparator:comparator", "WARN" ) __kamaelia_components__ = ( Comparator, )
def childrenDone(self): """Unplugs any children that have terminated, and returns true if there are no running child components left (ie. their microproceses have finished) """ for child in self.childComponents(): if child._isStopped(): self.removeChild(child) # deregisters linkages for us return 0 == len(self.childComponents()) import Kamaelia.Support.Deprecate as Deprecate pipeline = Deprecate.makeClassStub( Pipeline, "Use Kamaelia.Chassis.Pipeline:Pipeline instead of Kamaelia.Chassis.Pipeline:pipeline", "WARN") __kamaelia_components__ = (Pipeline, ) if __name__ == "__main__": from Axon.Component import scheduler from Kamaelia.Util.Console import ConsoleEchoer from Kamaelia.Util.PassThrough import PassThrough from Axon.Ipc import producerFinished, shutdownMicroprocess class fruitSource(component): def __init__(self): self.outlist = [ "apples\n", "pears\n", "grapes\n", "bananas\n", "oranges\n",
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.File.UnixProcess import UnixProcess as __UnixProcess Deprecate.deprecationWarning("Use Kamaelia.File.UnixProcess instead of Kamaelia.File.UnixPipe") Pipethrough = Deprecate.makeClassStub( __UnixProcess, "Use Kamaelia.File.UnixProcess:UnixProcess instead of Kamaelia.File.UnixPipe:Pipethrough", "WARN" ) # def __foo(*larg, **darg): # return __Pipeline(*larg,**darg) # # foo = Deprecate.makeFuncStub(__foo, message="blob")
# You may only modify and redistribute this under the terms of any of the # following licenses(2): Mozilla Public License, V1.1, GNU General # Public License, V2.0, GNU Lesser General Public License, V2.1 # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://kamaelia.sourceforge.net/AUTHORS - please extend this file, # not this notice. # (2) Reproduced in the COPYING file, and at: # http://kamaelia.sourceforge.net/COPYING # Under section 3.5 of the MPL, we are using this text since we deem the MPL # notice inappropriate for this file. As per MPL/GPL/LGPL removal of this # notice is prohibited. # # Please contact us via: [email protected] # to discuss alternative licensing. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.File.ReadFileAdaptor import ReadFileAdaptor as __ReadFileAdaptor Deprecate.deprecationWarning("Use Kamaelia.File.ReadFileAdaptor instead of Kamaelia.ReadFileAdaptor") ReadFileAdaptor = Deprecate.makeClassStub( __ReadFileAdaptor, "Use Kamaelia.File.ReadFileAdaptor:ReadFileAdaptor instead of Kamaelia.ReadFileAdaptor:ReadFileAdaptor", "WARN", )
# (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.File.ReadFileAdaptor import ReadFileAdaptor as __ReadFileAdaptor Deprecate.deprecationWarning( "Use Kamaelia.File.ReadFileAdaptor instead of Kamaelia.ReadFileAdaptor") ReadFileAdaptor = Deprecate.makeClassStub( __ReadFileAdaptor, "Use Kamaelia.File.ReadFileAdaptor:ReadFileAdaptor instead of Kamaelia.ReadFileAdaptor:ReadFileAdaptor", "WARN")
# You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.UI.Pygame.Display import _PygameEventSource as ___PygameEventSource from Kamaelia.UI.Pygame.Display import PygameDisplay as __PygameDisplay Deprecate.deprecationWarning( "Use Kamaelia.UI.Pygame.Display instead of Kamaelia.UI.PygameDisplay") _PygameEventSource = Deprecate.makeClassStub( ___PygameEventSource, "Use Kamaelia.UI.Pygame.Display:_PygameEventSource instead of Kamaelia.UI.PygameDisplay:_PygameEventSource", "WARN") PygameDisplay = Deprecate.makeClassStub( __PygameDisplay, "Use Kamaelia.UI.Pygame.Display:PygameDisplay instead of Kamaelia.UI.PygameDisplay:PygameDisplay", "WARN")
while self.dataReady("control"): data = self.recv("control") if isinstance(data, shutdownMicroprocess) or isinstance(data,producerFinished): self.send(data, "signal") return if not self.anyReady(): # This should be the case here. self.pause() yield 1 __kamaelia_components__ = ( Fanout, ) import Kamaelia.Support.Deprecate as Deprecate fanout = Deprecate.makeClassStub( Fanout, "Use Kamaelia.Util.Fanout:Fanout instead of Kamaelia.Util.Fanout:fanout", "WARN" )
# (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Chassis.Pipeline import Pipeline as __Pipeline Deprecate.deprecationWarning( "Use Kamaelia.Chassis.Pipeline instead of Kamaelia.Util.PipelineComponent") pipeline = Deprecate.makeClassStub( __Pipeline, "Use Kamaelia.Chassis.Pipeline:Pipeline instead of Kamaelia.Util.PipelineComponent:pipeline", "WARN")
# (2) Reproduced in the COPYING file, and at: # http://kamaelia.sourceforge.net/COPYING # Under section 3.5 of the MPL, we are using this text since we deem the MPL # notice inappropriate for this file. As per MPL/GPL/LGPL removal of this # notice is prohibited. # # Please contact us via: [email protected] # to discuss alternative licensing. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Codec.Vorbis import VorbisDecode as __VorbisDecode from Kamaelia.Codec.Vorbis import AOAudioPlaybackAdaptor as __AOAudioPlaybackAdaptor Deprecate.deprecationWarning("Use Kamaelia.Codec.Vorbis instead of Kamaelia.vorbisDecodeComponent") VorbisDecode = Deprecate.makeClassStub( __VorbisDecode, "Use Kamaelia.Codec.Vorbis:VorbisDecode instead of Kamaelia.vorbisDecodeComponent:VorbisDecode", "WARN" ) AOAudioPlaybackAdaptor = Deprecate.makeClassStub( __AOAudioPlaybackAdaptor, "Use Kamaelia.Codec.Vorbis:AOAudioPlaybackAdaptor instead of Kamaelia.vorbisDecodeComponent:AOAudioPlaybackAdaptor", "WARN" )
from Kamaelia.IPC import socketShutdown as __socketShutdown from Kamaelia.IPC import newCSA as __newCSA from Kamaelia.IPC import shutdownCSA as __shutdownCSA from Kamaelia.IPC import newServer as __newServer from Kamaelia.IPC import newWriter as __newWriter from Kamaelia.IPC import newReader as __newReader from Kamaelia.IPC import newExceptional as __newExceptional from Kamaelia.IPC import removeReader as __removeReader from Kamaelia.IPC import removeWriter as __removeWriter from Kamaelia.IPC import removeExceptional as __removeExceptional Deprecate.deprecationWarning("Use Kamaelia.IPC instead of Kamaelia.KamaeliaIPC") producerFinished = Deprecate.makeClassStub( __producerFinished, "Use Kamaelia.IPC:producerFinished instead of KamaeliaIPC:producerFinished", "WARN" ) notify = Deprecate.makeClassStub( __notify, "Use Kamaelia.IPC:notify instead of Kamaelia.KamaeliaIPC:notify", "WARN" ) socketShutdown = Deprecate.makeClassStub( __socketShutdown, "Use Kamaelia.IPC:socketShutdown instead of Kamaelia.KamaeliaIPC:socketShutdown", "WARN" )
# (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Chassis.Graphline import Graphline as __Graphline Deprecate.deprecationWarning("Use Kamaelia.Chassis.Graphline instead of Kamaelia.Util.Graphline") Graphline = Deprecate.makeClassStub( __Graphline, "Use Kamaelia.Chassis.Graphline:Graphline instead of Kamaelia.Util.Graphline:Graphline", "WARN" )
# You may only modify and redistribute this under the terms of any of the # following licenses(2): Mozilla Public License, V1.1, GNU General # Public License, V2.0, GNU Lesser General Public License, V2.1 # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://kamaelia.sourceforge.net/AUTHORS - please extend this file, # not this notice. # (2) Reproduced in the COPYING file, and at: # http://kamaelia.sourceforge.net/COPYING # Under section 3.5 of the MPL, we are using this text since we deem the MPL # notice inappropriate for this file. As per MPL/GPL/LGPL removal of this # notice is prohibited. # # Please contact us via: [email protected] # to discuss alternative licensing. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Util.Stringify import Stringify as __Stringify Deprecate.deprecationWarning("Use Kamaelia.Util.Stringify instead of Kamaelia.Util.ToStringComponent") ToStringComponent = Deprecate.makeClassStub( __Stringify, "Use Kamaelia.Util.Stringify:Stringify instead of Kamaelia.Util.ToStringComponent:ToStringComponent", "WARN", )
# http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Visualisation.PhysicsGraph.TopologyViewer import TopologyViewer as __TopologyViewer Deprecate.deprecationWarning( "Use Kamaelia.Visualisation.PhysicsGraph.TopologyViewer instead of Kamaelia.Visualisation.PhysicsGraph.TopologyViewerComponent" ) TopologyViewerComponent = Deprecate.makeClassStub( __TopologyViewer, "Use Kamaelia.Visualisation.PhysicsGraph.TopologyViewer:TopologyViewer instead of Kamaelia.Visualisation.PhysicsGraph.TopologyViewerComponent:TopologyViewerComponent", "WARN")
# You may only modify and redistribute this under the terms of any of the # following licenses(2): Mozilla Public License, V1.1, GNU General # Public License, V2.0, GNU Lesser General Public License, V2.1 # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://kamaelia.sourceforge.net/AUTHORS - please extend this file, # not this notice. # (2) Reproduced in the COPYING file, and at: # http://kamaelia.sourceforge.net/COPYING # Under section 3.5 of the MPL, we are using this text since we deem the MPL # notice inappropriate for this file. As per MPL/GPL/LGPL removal of this # notice is prohibited. # # Please contact us via: [email protected] # to discuss alternative licensing. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Util.TestResult import TestResult as __TestResultComponent Deprecate.deprecationWarning("Use Kamaelia.Util.TestResult instead of Kamaelia.Util.TestResultComponent") testResultComponent = Deprecate.makeClassStub( __TestResultComponent, "Use Kamaelia.Util.TestResult:TestResult instead of Kamaelia.Util.TestResultComponent:testResultComponent", "WARN" )
# You may only modify and redistribute this under the terms of any of the # following licenses(2): Mozilla Public License, V1.1, GNU General # Public License, V2.0, GNU Lesser General Public License, V2.1 # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://kamaelia.sourceforge.net/AUTHORS - please extend this file, # not this notice. # (2) Reproduced in the COPYING file, and at: # http://kamaelia.sourceforge.net/COPYING # Under section 3.5 of the MPL, we are using this text since we deem the MPL # notice inappropriate for this file. As per MPL/GPL/LGPL removal of this # notice is prohibited. # # Please contact us via: [email protected] # to discuss alternative licensing. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Chassis.Pipeline import Pipeline as __Pipeline Deprecate.deprecationWarning("Use Kamaelia.Chassis.Pipeline instead of Kamaelia.Util.PipelineComponent") pipeline = Deprecate.makeClassStub( __Pipeline, "Use Kamaelia.Chassis.Pipeline:Pipeline instead of Kamaelia.Util.PipelineComponent:pipeline", "WARN" )
# (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Chassis.ConnectedServer import SimpleServer as __SimpleServer Deprecate.deprecationWarning("Use Kamaelia.Chassis.ConnectedServer instead of Kamaelia.SimpleServerComponent") SimpleServer = Deprecate.makeClassStub( __SimpleServer, "Use Kamaelia.Chassis.ConnectedServer:SimpleServer instead of Kamaelia.SimpleServerComponent:SimpleServer", "WARN" )
data = self.recv(inbox) self.send(data, outbox) if inbox == "control": for ipc in self.shutdownOn: if isinstance(data, ipc): return 0 self.pause() return forwarded import Kamaelia.Support.Deprecate as Deprecate passThrough = Deprecate.makeClassStub( PassThrough, "Use Kamaelia.Util.PassThrough:PassThrough instead of Kamaelia.Util.PassThrough:passThrough or Kamaelia.Util.passThrough.PassThrough", "WARN" ) __kamaelia_components__ = ( PassThrough, ) if __name__=="__main__": from Axon.Component import scheduler from Console import ConsoleEchoer class fruitSource(component): def __init__(self): self.outlist = ["apples\n","pears\n","grapes\n","bananas\n","oranges\n","cherrys\n","lemons\n","<end of list>\n"] super(fruitSource,self).__init__()
# (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Internet.SingleServer import SingleServer as __SingleServer Deprecate.deprecationWarning( "Use Kamaelia.Internet.SingleServer instead of Kamaelia.SingleServer") SingleServer = Deprecate.makeClassStub( __SingleServer, "Use Kamaelia.Internet.SingleServer:SingleServer instead of Kamaelia.SingleServer:SingleServer", "WARN")
# (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Protocol.EchoProtocol import EchoProtocol as __EchoProtocol Deprecate.deprecationWarning("Use Kamaelia.Protocol.EchoProtocol instead of Kamaelia.Protocol.EchoProtocolComponent:") EchoProtocol = Deprecate.makeClassStub( __EchoProtocol, "Use Kamaelia.Protocol.EchoProtocol:EchoProtocol instead of Kamaelia.Protocol.EchoProtocolComponent:EchoProtocol", "WARN" )
# You may only modify and redistribute this under the terms of any of the # following licenses(2): Mozilla Public License, V1.1, GNU General # Public License, V2.0, GNU Lesser General Public License, V2.1 # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://kamaelia.sourceforge.net/AUTHORS - please extend this file, # not this notice. # (2) Reproduced in the COPYING file, and at: # http://kamaelia.sourceforge.net/COPYING # Under section 3.5 of the MPL, we are using this text since we deem the MPL # notice inappropriate for this file. As per MPL/GPL/LGPL removal of this # notice is prohibited. # # Please contact us via: [email protected] # to discuss alternative licensing. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Chassis.Graphline import Graphline as __Graphline Deprecate.deprecationWarning("Use Kamaelia.Chassis.Graphline instead of Kamaelia.Util.Graphline") Graphline = Deprecate.makeClassStub( __Graphline, "Use Kamaelia.Chassis.Graphline:Graphline instead of Kamaelia.Util.Graphline:Graphline", "WARN" )
# (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Visualisation.PhysicsGraph.TopologyViewer import TopologyViewer as __TopologyViewer Deprecate.deprecationWarning("Use Kamaelia.Visualisation.PhysicsGraph.TopologyViewer instead of Kamaelia.Visualisation.PhysicsGraph.TopologyViewerComponent") TopologyViewerComponent = Deprecate.makeClassStub( __TopologyViewer, "Use Kamaelia.Visualisation.PhysicsGraph.TopologyViewer:TopologyViewer instead of Kamaelia.Visualisation.PhysicsGraph.TopologyViewerComponent:TopologyViewerComponent", "WARN" )
# http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Util.TestResult import TestResult as __TestResultComponent Deprecate.deprecationWarning( "Use Kamaelia.Util.TestResult instead of Kamaelia.Util.TestResultComponent" ) testResultComponent = Deprecate.makeClassStub( __TestResultComponent, "Use Kamaelia.Util.TestResult:TestResult instead of Kamaelia.Util.TestResultComponent:testResultComponent", "WARN")
# http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Protocol.EchoProtocol import EchoProtocol as __EchoProtocol Deprecate.deprecationWarning( "Use Kamaelia.Protocol.EchoProtocol instead of Kamaelia.Protocol.EchoProtocolComponent:" ) EchoProtocol = Deprecate.makeClassStub( __EchoProtocol, "Use Kamaelia.Protocol.EchoProtocol:EchoProtocol instead of Kamaelia.Protocol.EchoProtocolComponent:EchoProtocol", "WARN")
def childrenDone(self): """Unplugs any children that have terminated, and returns true if there are no running child components left (ie. their microproceses have finished) """ for child in self.childComponents(): if child._isStopped(): self.removeChild(child) # deregisters linkages for us return 0==len(self.childComponents()) import Kamaelia.Support.Deprecate as Deprecate pipeline = Deprecate.makeClassStub( Pipeline, "Use Kamaelia.Chassis.Pipeline:Pipeline instead of Kamaelia.Chassis.Pipeline:pipeline", "WARN" ) __kamaelia_components__ = ( Pipeline, ) if __name__=="__main__": from Axon.Component import scheduler from Kamaelia.Util.Console import ConsoleEchoer from Kamaelia.Util.PassThrough import PassThrough from Axon.Ipc import producerFinished, shutdownMicroprocess class fruitSource(component): def __init__(self): super(fruitSource,self).__init__()
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.File.UnixProcess import UnixProcess as __UnixProcess Deprecate.deprecationWarning( "Use Kamaelia.File.UnixProcess instead of Kamaelia.File.UnixPipe") Pipethrough = Deprecate.makeClassStub( __UnixProcess, "Use Kamaelia.File.UnixProcess:UnixProcess instead of Kamaelia.File.UnixPipe:Pipethrough", "WARN") # def __foo(*larg, **darg): # return __Pipeline(*larg,**darg) # # foo = Deprecate.makeFuncStub(__foo, message="blob")
"""\ Unplugs any children that have terminated, and returns true if there are no running child components left (ie. their microproceses have finished) """ for child in self.childComponents(): if child._isStopped(): self.removeChild(child) # deregisters linkages for us return 0 == len(self.childComponents()) __kamaelia_components__ = ( Backplane, PublishTo, SubscribeTo, ) # deprecation stubs import Kamaelia.Support.Deprecate as Deprecate publishTo = Deprecate.makeClassStub( PublishTo, "Use Kamaelia.Util.Backplane:PublishTo instead of Kamaelia.Util.Backplane:publishTo", "WARN") subscribeTo = Deprecate.makeClassStub( SubscribeTo, "Use Kamaelia.Util.Backplane:SubscribeTo instead of Kamaelia.Util.Backplane:subscribeTo", "WARN")
# (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Util.Stringify import Stringify as __Stringify Deprecate.deprecationWarning( "Use Kamaelia.Util.Stringify instead of Kamaelia.Util.ToStringComponent") ToStringComponent = Deprecate.makeClassStub( __Stringify, "Use Kamaelia.Util.Stringify:Stringify instead of Kamaelia.Util.ToStringComponent:ToStringComponent", "WARN")
for child in self.childComponents(): if child._isStopped(): self.removeChild(child) # deregisters linkages for us return 0==len(self.childComponents()) __kamaelia_components__ = ( Backplane, PublishTo, SubscribeTo, ) # deprecation stubs import Kamaelia.Support.Deprecate as Deprecate publishTo = Deprecate.makeClassStub( PublishTo, "Use Kamaelia.Util.Backplane:PublishTo instead of Kamaelia.Util.Backplane:publishTo", "WARN" ) subscribeTo = Deprecate.makeClassStub( SubscribeTo, "Use Kamaelia.Util.Backplane:SubscribeTo instead of Kamaelia.Util.Backplane:subscribeTo", "WARN" )
# (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Util.Console import ConsoleEchoer as __ConsoleEchoer Deprecate.deprecationWarning("Use Kamaelia.Util.Console instead of Kamaelia.Util.ConsoleEcho") consoleEchoer = Deprecate.makeClassStub( __ConsoleEchoer, "Use Kamaelia.Util.Console:ConsoleEchoer instead of Kamaelia.Util.ConsoleEcho:consoleEchoer", "WARN" )
forwarded += 1 data = self.recv(inbox) self.send(data, outbox) if inbox == "control": for ipc in self.shutdownOn: if isinstance(data, ipc): return 0 self.pause() return forwarded import Kamaelia.Support.Deprecate as Deprecate passThrough = Deprecate.makeClassStub( PassThrough, "Use Kamaelia.Util.PassThrough:PassThrough instead of Kamaelia.Util.PassThrough:passThrough or Kamaelia.Util.passThrough.PassThrough", "WARN") __kamaelia_components__ = (PassThrough, ) if __name__ == "__main__": from Axon.Component import scheduler from Console import ConsoleEchoer class fruitSource(component): def __init__(self): self.outlist = [ "apples\n", "pears\n", "grapes\n", "bananas\n", "oranges\n", "cherrys\n", "lemons\n", "<end of list>\n" ] super(fruitSource, self).__init__()
# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.UI.Pygame.Display import _PygameEventSource as ___PygameEventSource from Kamaelia.UI.Pygame.Display import PygameDisplay as __PygameDisplay Deprecate.deprecationWarning("Use Kamaelia.UI.Pygame.Display instead of Kamaelia.UI.PygameDisplay") _PygameEventSource = Deprecate.makeClassStub( ___PygameEventSource, "Use Kamaelia.UI.Pygame.Display:_PygameEventSource instead of Kamaelia.UI.PygameDisplay:_PygameEventSource", "WARN" ) PygameDisplay = Deprecate.makeClassStub( __PygameDisplay, "Use Kamaelia.UI.Pygame.Display:PygameDisplay instead of Kamaelia.UI.PygameDisplay:PygameDisplay", "WARN" )
# Public License, V2.0, GNU Lesser General Public License, V2.1 # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://kamaelia.sourceforge.net/AUTHORS - please extend this file, # not this notice. # (2) Reproduced in the COPYING file, and at: # http://kamaelia.sourceforge.net/COPYING # Under section 3.5 of the MPL, we are using this text since we deem the MPL # notice inappropriate for this file. As per MPL/GPL/LGPL removal of this # notice is prohibited. # # Please contact us via: [email protected] # to discuss alternative licensing. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Internet.SingleServer import SingleServer as __SingleServer Deprecate.deprecationWarning("Use Kamaelia.Internet.SingleServer instead of Kamaelia.SingleServer") SingleServer = Deprecate.makeClassStub( __SingleServer, "Use Kamaelia.Internet.SingleServer:SingleServer instead of Kamaelia.SingleServer:SingleServer", "WARN" )
# You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Codec.Vorbis import VorbisDecode as __VorbisDecode from Kamaelia.Codec.Vorbis import AOAudioPlaybackAdaptor as __AOAudioPlaybackAdaptor Deprecate.deprecationWarning( "Use Kamaelia.Codec.Vorbis instead of Kamaelia.vorbisDecodeComponent") VorbisDecode = Deprecate.makeClassStub( __VorbisDecode, "Use Kamaelia.Codec.Vorbis:VorbisDecode instead of Kamaelia.vorbisDecodeComponent:VorbisDecode", "WARN") AOAudioPlaybackAdaptor = Deprecate.makeClassStub( __AOAudioPlaybackAdaptor, "Use Kamaelia.Codec.Vorbis:AOAudioPlaybackAdaptor instead of Kamaelia.vorbisDecodeComponent:AOAudioPlaybackAdaptor", "WARN")
# (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------- """\ This is a deprecation stub, due for later removal. """ import Kamaelia.Support.Deprecate as Deprecate from Kamaelia.Util.Filter import Filter as __FilterComponent Deprecate.deprecationWarning("Use Kamaelia.Util.Filter instead of Kamaelia.Util.FilterComponent") FilterComponent = Deprecate.makeClassStub( __FilterComponent, "Use Kamaelia.Util.Filter:Filter instead of Kamaelia.Util.FilterComponent:FilterComponent", "WARN" )
for boxname in boxnames: self.Outboxes[boxname] = "Copy of data received at 'inbox' inbox" super(Fanout, self).__init__() def main(self): """Main loop.""" while 1: while self.dataReady("inbox"): data = self.recv("inbox") for boxname in self.Outboxes: self.send(data, boxname) while self.dataReady("control"): data = self.recv("control") if isinstance(data, shutdownMicroprocess) or isinstance( data, producerFinished): self.send(data, "signal") return if not self.anyReady(): # This should be the case here. self.pause() yield 1 __kamaelia_components__ = (Fanout, ) import Kamaelia.Support.Deprecate as Deprecate fanout = Deprecate.makeClassStub( Fanout, "Use Kamaelia.Util.Fanout:Fanout instead of Kamaelia.Util.Fanout:fanout", "WARN")