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

All Samples(377)  |  Call(216)  |  Derive(0)  |  Import(161)

src/k/a/kamaelia-HEAD/Sketches/MPS/Examples/ListExamples/SimpleChatSystem.py   kamaelia(Download)
 
import Axon
from Axon.Ipc import WaitComplete
from Kamaelia.Chassis.Graphline import Graphline
from Kamaelia.Internet.TCPClient import TCPClient
                self.pause()
                yield 1
        return WaitComplete(wait_inbox())
 
class MyServer(Axon.Component.component, wait_utils):

src/k/a/kamaelia-HEAD/Sketches/MPS/Experiments/ExampleRunner.py   kamaelia(Download)
            del X
 
        return Axon.Ipc.WaitComplete(Y(X,outbox,signal,inbox,control))
 
    def system(self, command):

src/k/a/kamaelia-HEAD/Sketches/MPS/POP3/spam_grab.py   kamaelia(Download)
import Axon
import sys
from Axon.Ipc import producerFinished, WaitComplete, shutdownMicroprocess
from Kamaelia.IPC import socketShutdown
 
    def waitForBanner(self):
        yield WaitComplete(self.getline(), tag="_getline1")
#        print "SERVER RESPONSE", self.line
        self.banner = self.line.strip()
 
    def doLogin(self, username, password):
        self.sendCommand("USER "+username)
        yield WaitComplete(self.getline(), tag="_getline2")
#        print "SERVER RESPONSE", self.line
        if self.line[:3] == "+OK":
            self.sendCommand("PASS "+ password)
            yield WaitComplete(self.getline(), tag="_getline3")
    def handleCommand(self, command):
        if command[0] == "STAT":
            self.sendCommand("STAT")
            yield WaitComplete(self.getline(), tag="_getline4")
#            print "SERVER RESPONSE", self.line

src/k/a/kamaelia-HEAD/Sketches/MPS/POP3/possible_ham_grab.py   kamaelia(Download)
import Axon
import sys
from Axon.Ipc import producerFinished, WaitComplete, shutdownMicroprocess
from Kamaelia.IPC import socketShutdown
 
    def waitForBanner(self):
        yield WaitComplete(self.getline(), tag="_getline1")
#        print "SERVER RESPONSE", self.line
        self.banner = self.line.strip()
 
    def doLogin(self, username, password):
        self.sendCommand("USER "+username)
        yield WaitComplete(self.getline(), tag="_getline2")
#        print "SERVER RESPONSE", self.line
        if self.line[:3] == "+OK":
            self.sendCommand("PASS "+ password)
            yield WaitComplete(self.getline(), tag="_getline3")
    def handleCommand(self, command):
        if command[0] == "STAT":
            self.sendCommand("STAT")
            yield WaitComplete(self.getline(), tag="_getline4")
#            print "SERVER RESPONSE", self.line

src/k/a/kamaelia-HEAD/Sketches/MPS/POP3/spam_deletion_assistant.py   kamaelia(Download)
import Axon
import sys
from Axon.Ipc import producerFinished, WaitComplete, shutdownMicroprocess
from Kamaelia.IPC import socketShutdown
 
    def waitForBanner(self):
        yield WaitComplete(self.getline(), tag="_getline1")
#        print "SERVER RESPONSE", self.line
        self.banner = self.line.strip()
 
    def doLogin(self, username, password):
        self.sendCommand("USER "+username)
        yield WaitComplete(self.getline(), tag="_getline2")
#        print "SERVER RESPONSE", self.line
        if self.line[:3] == "+OK":
            self.sendCommand("PASS "+ password)
            yield WaitComplete(self.getline(), tag="_getline3")
    def handleCommand(self, command):
        if command[0] == "STAT":
            self.sendCommand("STAT")
            yield WaitComplete(self.getline(), tag="_getline4")
#            print "SERVER RESPONSE", self.line

src/k/a/kamaelia-HEAD/Code/Python/Kamaelia/Kamaelia/Apps/Grey/MailHandler.py   kamaelia(Download)
 
import Axon
from Axon.Ipc import producerFinished, WaitComplete
from Kamaelia.IPC import socketShutdown
 
 
        while (not self.gettingdata) and (not self.breakConnection):
            yield WaitComplete(self.getline(), tag="_getline1")
            try:
                command = self.line.split()
                self.netPrint('354 Enter message, ending with "." on a line by itself')
                while not EndOfMessage:
                    yield WaitComplete(self.getline(), tag="getline2")
                    if self.lastline():
                        EndOfMessage = True
                self.netPrint("250 OK id-deferred")
 
        self.send(producerFinished(),"signal")
        if not brokenClient:
            yield WaitComplete(self.handleDisconnect(),tag="_handleDisconnect")

src/k/a/kamaelia-HEAD/Sketches/MPS/Old/Grey/greylisting.py   kamaelia(Download)
import anydbm
# import pprint
from Axon.Ipc import producerFinished, WaitComplete
from Kamaelia.Chassis.ConnectedServer import MoreComplexServer
 
 
        while (not self.gettingdata) and (not self.breakConnection):
            yield WaitComplete(self.getline(), tag="_getline1")
            try:
                command = self.line.split()
                self.netPrint('354 Enter message, ending with "." on a line by itself')
                while not EndOfMessage:
                    yield WaitComplete(self.getline(), tag="getline2")
                    if self.line == ".\r\n": EndOfMessage = True
                    if len(self.line) >=5:
        self.send(producerFinished(),"signal")
        if not brokenClient:
            yield WaitComplete(self.handleDisconnect(),tag="_handleDisconnect")
        self.logResult()
 
        for line in self.inbox_log:
            if not sentDataLine: # wait for a response from the server before sending next line
                yield WaitComplete(self.getline_fromsmtpserver(),tag="getline_smtp")
 
            self.send(line, "tcp_outbox")

src/k/a/kamaelia-HEAD/Sketches/MPS/Old/greylisting.py   kamaelia(Download)
import os
 
from Axon.Ipc import producerFinished, WaitComplete
from Kamaelia.Chassis.ConnectedServer import MoreComplexServer
 
 
        while (not self.gettingdata) and (not self.breakConnection):
            yield WaitComplete(self.getline(), tag="_getline1")
            try:
                command = self.line.split()
                self.netPrint('354 Enter message, ending with "." on a line by itself')
                while not EndOfMessage:
                    yield WaitComplete(self.getline(), tag="getline2")
                    if self.lastline():
                        EndOfMessage = True
                self.netPrint("250 OK id-deferred")
 
        self.send(producerFinished(),"signal")
        if not brokenClient:
            yield WaitComplete(self.handleDisconnect(),tag="_handleDisconnect")
        for line in self.inbox_log:
            if not sentDataLine: # wait for a response from the server before sending next line
                yield WaitComplete(self.getline_fromsmtpserver(),tag="getline_smtp")
 
            self.send(line, "tcp_outbox")

src/k/a/Kamaelia-0.6.0/Kamaelia/Apps/Grey/MailHandler.py   Kamaelia(Download)
 
import Axon
from Axon.Ipc import producerFinished, WaitComplete
from Kamaelia.IPC import socketShutdown
 
 
        while (not self.gettingdata) and (not self.breakConnection):
            yield WaitComplete(self.getline(), tag="_getline1")
            try:
                command = self.line.split()
                self.netPrint('354 Enter message, ending with "." on a line by itself')
                while not EndOfMessage:
                    yield WaitComplete(self.getline(), tag="getline2")
                    if self.lastline():
                        EndOfMessage = True
                self.netPrint("250 OK id-deferred")
 
        self.send(producerFinished(),"signal")
        if not brokenClient:
            yield WaitComplete(self.handleDisconnect(),tag="_handleDisconnect")

src/k/a/kamaelia-HEAD/Code/Python/Kamaelia/Kamaelia/Apps/Grey/ConcreteMailHandler.py   kamaelia(Download)
 
import time
from Axon.Ipc import producerFinished, WaitComplete
from Kamaelia.Internet.TCPClient import TCPClient
from Kamaelia.Apps.Grey.MailHandler import MailHandler
        for line in self.inbox_log:
            if not sentDataLine: # wait for a response from the server before sending next line
                yield WaitComplete(self.getline_fromsmtpserver(),tag="getline_smtp")
 
            self.send(line, "tcp_outbox")

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