def __init__(self, **kwds): self.debug = 1 self.port = None # # Create the database object # db = bbDatabase() # # Create database connection # self.con = db.getbbcon() # # Create the bb directory structure if it doesn't exist # self.__createbbdirs() # # Read or create necessary bb configuration # self.__readconfigfile() # # Load all commands # commands.loadcommands() # # Assign command object to this class # self.commands = commands.commands # # See if port was sent as an arg, assing it # if kwds.has_key('port'): self.port = kwds['port'] # # If port wasn't sent, prompt for it # while not self.port: self.port = raw_input('enter port number for RPC service: ') # # Start the rpc server # self.startserver() print "server loading completed"
def __init__(self, **kwds): self.debug = 1 self.port = None; # # Create the database object # db = bbDatabase() # # Create database connection # self.con = db.getbbcon() # # Create the bb directory structure if it doesn't exist # self.__createbbdirs() # # Read or create necessary bb configuration # self.__readconfigfile() # # Load all commands # commands.loadcommands() # # Assign command object to this class # self.commands = commands.commands # # See if port was sent as an arg, assing it # if kwds.has_key('port'): self.port = kwds['port'] # # If port wasn't sent, prompt for it # while not self.port: self.port = raw_input('enter port number for RPC service: ') # # Start the rpc server # self.startserver() print "server loading completed"
import os import sys import time import socket import xmlrpclib import subprocess import ConfigParser from SimpleXMLRPCServer import SimpleXMLRPCServer from bbQueries import bbQueries from bbDatabase import bbDatabase from bbCommands import * hostname = socket.gethostname() queries = bbQueries() db = bbDatabase() dir = os.getcwd() config = ConfigParser.RawConfigParser() commands = bbCommands() class bbServer: finished = False # # Initialize class # def __init__(self, **kwds): self.debug = 1
import os import sys import time import socket import xmlrpclib import subprocess import ConfigParser from SimpleXMLRPCServer import SimpleXMLRPCServer from bbQueries import bbQueries from bbDatabase import bbDatabase from bbCommands import * hostname = socket.gethostname() queries = bbQueries() db = bbDatabase() dir = os.getcwd() config = ConfigParser.RawConfigParser() commands = bbCommands() class bbServer: finished=False # # Initialize class # def __init__(self, **kwds): self.debug = 1