Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5271)  |  Call(5271)  |  Derive(0)  |  Import(0)

src/k/a/kamaelia-HEAD/Sketches/MPS/BugReports/FixTests/Kamaelia/Examples/DVB_Systems/PersonalVideoRecorder.py   kamaelia(Download)
            # start recording
            service_id = newNowEvent['service']
            self.send("START", "outbox")
 
            while recording:
 
            # stop recording
            self.send("STOP", "outbox")
 
 
 
            # request audio and video data
            self.send( ("ADD",[audio_pid,video_pid], (self,"_av_packets")), "_toDemuxer")
            print time.asctime(), "Recording ",audio_pid,video_pid
 
            while recording:
                while self.dataReady("_av_packets"):
                    packet = self.recv("_av_packets")
                    self.send(packet,"outbox")
                yield 1
 
            self.send( ("REMOVE", [audio_pid,video_pid], (self,"_av_packets")), "_toDemuxer")
            print time.asctime(), "Stopped",audio_pid,video_pid
 

src/k/a/kamaelia-HEAD/Sketches/MPS/BugReports/FixTests/Kamaelia/Examples/TCP_Systems/HTTP/cookbook_2.py   kamaelia(Download)
           "length": len("<html><body><h1>Hello World</h1><P> Game Over!! </body></html>"),
        }
        self.send(resource, "outbox"); yield 1
        page = {
          "data" : "<html><body><h1>Hello World</h1><P> Game Over!! </body></html>"
        }
        self.send(page, "outbox"); yield 1
        self.send(Axon.Ipc.producerFinished(self), "signal")        
    def main(self):
        self.send(self.args, "outbox")
        self.send(Axon.Ipc.producerFinished(self), "signal")        
        yield 1
 

src/k/a/kamaelia-HEAD/Code/Python/Kamaelia/Examples/DVB_Systems/PersonalVideoRecorder.py   kamaelia(Download)
            # start recording
            service_id = newNowEvent['service']
            self.send("START", "outbox")
 
            while recording:
 
            # stop recording
            self.send("STOP", "outbox")
 
 
 
            # request audio and video data
            self.send( ("ADD",[audio_pid,video_pid], (self,"_av_packets")), "_toDemuxer")
            print time.asctime(), "Recording ",audio_pid,video_pid
 
            while recording:
                while self.dataReady("_av_packets"):
                    packet = self.recv("_av_packets")
                    self.send(packet,"outbox")
                yield 1
 
            self.send( ("REMOVE", [audio_pid,video_pid], (self,"_av_packets")), "_toDemuxer")
            print time.asctime(), "Stopped",audio_pid,video_pid
 

src/k/a/kamaelia-HEAD/Code/Python/Kamaelia/Examples/TCP_Systems/HTTP/cookbook_2.py   kamaelia(Download)
           "length": len("<html><body><h1>Hello World</h1><P> Game Over!! </body></html>"),
        }
        self.send(resource, "outbox"); yield 1
        page = {
          "data" : "<html><body><h1>Hello World</h1><P> Game Over!! </body></html>"
        }
        self.send(page, "outbox"); yield 1
        self.send(Axon.Ipc.producerFinished(self), "signal")        
    def main(self):
        self.send(self.args, "outbox")
        self.send(Axon.Ipc.producerFinished(self), "signal")        
        yield 1
 

src/k/a/kamaelia-HEAD/Sketches/MPS/BugReports/FixTests/Kamaelia/Examples/DVB_Systems/Macro.py   kamaelia(Download)
                pid = struct.unpack(">H", packet[1: 3])[0] & 0x1fff
                if pid != 18:
                    self.send( packet, "outbox")
                else:
                    self.send( packet, "_eit_")
        # tell transcoder to stop
        print uid,"Transcoding must now stop..."
        self.send(producerFinished(), "_stop")
 
        print uid,"waiting for transcoder to finish"
 
        print uid,"Sending done signal"
        self.send(producerFinished(), "signal")
 
#         # HACK HACK HACK

src/k/a/kamaelia-HEAD/Code/Python/Kamaelia/Examples/DVB_Systems/Macro.py   kamaelia(Download)
                pid = struct.unpack(">H", packet[1: 3])[0] & 0x1fff
                if pid != 18:
                    self.send( packet, "outbox")
                else:
                    self.send( packet, "_eit_")
        # tell transcoder to stop
        print uid,"Transcoding must now stop..."
        self.send(producerFinished(), "_stop")
 
        print uid,"waiting for transcoder to finish"
 
        print uid,"Sending done signal"
        self.send(producerFinished(), "signal")
 
#         # HACK HACK HACK

src/k/a/kamaelia-HEAD/Sketches/PO/KamPlanet/SimpleSample.py   kamaelia(Download)
    def main(self):
        while True:
            while self.dataReady('inbox'):
                data = self.recv('inbox')
                self.send(data, 'outbox')
            while self.dataReady('numbers'):
                data = self.recv('numbers')
                self.send(str(data), 'outbox')
            while self.dataReady('control'):
                data = self.recv('control')
                self.send(data, 'signal')
                return
            if not self.anyReady():

src/k/a/kamaelia-HEAD/Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Audio/PyMedia/Resample.py   kamaelia(Download)
                data = self.recv("inbox")
                resampled = str(self.resampler.resample(data))
                self.send(resampled, "outbox")
 
            while self.dataReady("control"):
                msg=self.recv("control")
                if isinstance(msg, (producerFinished,shutdownMicroprocess)):
                    shutdown=True
                self.send(msg,"signal")

src/k/a/kamaelia-HEAD/Sketches/MPS/Examples/LUGRadio/Macro.py   kamaelia(Download)
                pid = struct.unpack(">H", packet[1: 3])[0] & 0x1fff
                if pid != 18:
                    self.send( packet, "outbox")
                else:
                    self.send( packet, "_eit_")
        # tell transcoder to stop
        print uid,"Transcoding must now stop..."
        self.send(producerFinished(), "_stop")
 
        print uid,"waiting for transcoder to finish"
 
        print uid,"Sending done signal"
        self.send(producerFinished(), "signal")
 
#         # HACK HACK HACK

src/k/a/kamaelia-HEAD/Sketches/PO/test_examples/example4.py   kamaelia(Download)
        # The idea is that deploying the required infrastructure 
        # may be difficult
        self.send('message1', 'outbox')
        yield 1
        self.send('message2', 'outbox')
        yield 1
        self.send('message3', 'outbox2')
            while self.dataReady('_inbox'):
                data = self.recv('_inbox')
                self.send(data, 'outbox')
 
            while self.dataReady('_inbox2'):
                data = self.recv('_inbox2')
                self.send(data, 'outbox')

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next