예제 #1
0
 def __init__(self):
     print "main"
     
     ecpu = Ecpu(Main.memory, Main.consoleRequests, Main.readyProcesses, Main.pcbs)
     ex = Exec(Main.memory, Main.partitions, Main.partitionLength, Main.pcbs, Main.readyProcesses)
     console = Console(Main.memory, Main.consoleRequests, ecpu)
     
     console.start()
     ecpu.start()
     ex.start()
예제 #2
0
'''
Created on Feb 19, 2019

@author: Adrian
'''
from Repository import Repository
from Controller import Controller
from Console import Console

if __name__ == '__main__':

    repository = Repository()
    controller = Controller(repository)
    console = Console(controller)

    console.start()
예제 #3
0
from Console import Console
from sys import exit

import Modules


if __name__ == '__main__':
    try:
        c = Console()
        module = 'console'

        while True:
            # if not in console, print module name
            if module != 'console':
                c.start(module)
            else:
                c.start()   
            c.set_user_option(module)

            option = c.get_user_option()
            if option == 0:
                raise KeyboardInterrupt
            
            # Initialize a module if in console
            if module == 'console':
                if option == 1:
                    module = 'scanning'
                    scan_module = Modules.Scanning()
                elif option == 2:
                    module = 'osint'
                    osint_module = Modules.Osint()
예제 #4
0
from LedBulb import LedBulbs

if __name__ == "__main__":

    config = Config();

    try:
        animations = AnimationManager(config)

        ledBulbs = LedBulbs()
        console = Console(config, ledBulbs, animations)
        clients = ClientManager(config, console, animations, ledBulbs)
        update = UpdateServer(config)

        clients.run()

        try:
            update.run()
        except FileNotFoundError:
            # No update files found.
            pass

        console.start()

    except KeyboardInterrupt:
        os._exit(1)

    except:
        print("Unexpected error: %s" % sys.exc_info()[0])
        raise