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

All Samples(16)  |  Call(12)  |  Derive(0)  |  Import(4)

src/b/l/bleep-HEAD/services/IrcService.py   bleep(Download)
from services.BleepService import BleepService, BleepServiceError
import socket
import time
__all__ = ['irc',]
 
    def perform(self, reqdata):
        if not reqdata.has_key('channel'):
            raise BleepServiceError("mising param: channel")
        if not reqdata.has_key('message'):
            raise BleepServiceError("mising param: message")
        if not reqdata.has_key('nick'):
            raise BleepServiceError("mising param: nick")          

src/b/l/bleep-HEAD/services/EmailService.py   bleep(Download)
 
from bleeps.models import Bleep
from services.BleepService import BleepService, BleepServiceError, BleepServiceResult
 
 
      smtp.quit()
    except smtplib.SMTPException as (err):
      raise BleepServiceError("Unable to send email. " + err.message)
    except Exception as (exc):
      raise BleepServiceError("Unexpected SMTP error. " + str(exc))
      config.read(conf_file)
    except ConfigParser.Error as (cnferr):
      raise BleepServiceError("Failed reading config file. "+str(cnferr))
    print 'debuggery: config file parsed ok'
 
      fp = open(image_file,'rb'); # read as binary
    except IOError as (e):
      raise BleepServiceError(e)
    msgImage = MIMEImage(fp.read())
    fp.close()

src/b/l/bleep-HEAD/services/tracker.py   bleep(Download)
from bleeps.models import Bleep
from services.BleepService import BleepService, BleepServiceError
 
__all__ = ['TrackerService',]
 
  def perform(self, reqdata):
    if not reqdata.has_key('project'):
      raise BleepServiceError("mising param: project")    
    self.get_result().add_msg('doing it like a phony tracker would for the "%s" project!' % reqdata['project'])
    return self.get_result()

src/b/l/bleep-HEAD/services/LighthouseService.py   bleep(Download)
import urllib2
import xml.etree.ElementTree
 
from bleeps.models import Bleep
from services.BleepService import BleepService, BleepServiceError
  def perform(self, reqdata):
    if not reqdata.has_key('project'):
      raise BleepServiceError("missing required param: project")
    if not reqdata.has_key('project_id'):
      raise BleepServiceError("missing required param: project_id")
    if not reqdata.has_key('token'):
      raise BleepServiceError("missing required param: token")    
      return f
    except urllib2.URLError as (exc):
      raise BleepServiceError(exc)