Exemple #1
0
	def run(self):
		# hook up the sniffer
		self.sniffer = sniffer.Sniffer(self)

		# create object to manage database storage
		self.storage = Storage(self, cfg.NOW())

		self.sniffer.run()
Exemple #2
0
    def __init__(self, base, conf_fn):
        self.host = socket.gethostname()
        self.base = base
        self.conf = {}

        # should emit a failure (file not found) message
        if os.path.exists(conf_fn):
            with open(conf_fn) as cf:
                for line in cf:
                    name, var = line.partition("=")[::2]
                    self.conf[name.strip()] = var.strip()
        else:
            raise Exception("configuration file not found.")

        # create storage
        self.__store = Storage()
Exemple #3
0
import json
import os
import time
import socket
from data.storage import Storage
from data.models import User, Board, Pin
# bottle framework
from bottle import request, response, route, error, static_file

# moo
from classroom import Room
# virtual classroom implementation
room = None
# Global Database variable
global db
db = Storage()


#
def setup(base, conf_fn):
    print '\n**** service initialization ****\n'
    global room
    room = Room(base, conf_fn)


@error(404)
def error404(error):
    """
    This method returns 'Nothing here, sorry' when there is any error in the URL
    """
    return 'Nothing here, sorry'
Exemple #4
0
 def __init__(self):
     print 'Course created'
     # create storag
     self.__store = Storage()
Exemple #5
0
 def __init__(self):
     print 'quiz created'
     # create storage
     self.__store = Storage()
Exemple #6
0
 def __init__(self):
     print 'User created'
     # create storag
     self.__store = Storage()
Exemple #7
0
def setup():
    global storageobj, sessionobj, recoObj
    storageobj = Storage()
    recoObj = RecoEngine()
    connection = Connection('localhost', 27017)
    sessionobj = Session(connection.doccdb)
Exemple #8
0
 def __init__(self):
     print 'discussion created'
     # create storage
     self.__store = Storage()
Exemple #9
0
 def __init__(self):
     self.db = Storage().db
Exemple #10
0
 def __init__(self):
     print 'Category created'
     # create storage 
     self.__store = Storage()
Exemple #11
0
 def __init__(self):
     print 'message created'
     # create storage
     self.__store = Storage()
Exemple #12
0
 def __init__(self):
     print 'Announcement created'
     # create storag
     self.__store = Storage()
Exemple #13
0
 def __init__(self):
     print 'Professor created\n'
     # create storag
     self.__store = Storage()