def setUp(self): """ Initialize framework Load modules Load console without loop Redirect stdout and stderr to readable fileobjects """ if not self.debugTest: sys.stdout = StringIO() sys.stderr = StringIO() self._hook_streams(sys.__stdout__.fileno(), sys.__stderr__.fileno()) self.ui = ui('console') loader().do_load(sys.path[0] + '/modules/') self.ui.c = console() self.tm = TaskManager() self.vfs = vfs.vfs() if not self.debugTest: self._restore_streams() # Close and re '.. = StringIO()' to drop output from modules loader # FIXME [...] sys.stderr.close() [...] AttributeError: __RedirectIO instance has no attribute 'close' try: sys.stdout.close() except AttributeError: del sys.stdout try: sys.stderr.close() except AttributeError: del sys.stderr sys.stdout = StringIO() sys.stderr = StringIO()
from domain.square import Square from controller.squareController import Controller from ui.ui import ui from tests import MyTestCase sqr = Square() Test = MyTestCase() Test.do_tests() a = Controller(sqr) cons = ui(a, "data/Pattern.txt", "data/configuration.txt") cons.run()
Digital-forensic framework launcher """ import os, sys, getopt if os.name == "posix": try: import dl sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL) except ImportError: import ctypes sys.setdlopenflags(sys.getdlopenflags() | ctypes.RTLD_GLOBAL) from api.manager.manager import ApiManager from ui.ui import ui, usage def fg(): """Launch shell loop""" global ui ui.c.cmdloop() if __name__ == "__main__": """You can place some script command here for testing purpose""" argv = usage(sys.argv[1:]) if argv.graphical == 1: ui = ui('gui') else: ui = ui('console') ui.launch()
from ui.ui import ui ui()
# Author(s): # Solal Jacob <*****@*****.**> # """@package dff Digital-forensic framework launcher """ import os, sys, getopt if os.name == "posix": try : import dl sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL) except ImportError: import ctypes sys.setdlopenflags(sys.getdlopenflags() | ctypes.RTLD_GLOBAL) from api.manager.manager import ApiManager from ui.ui import ui, usage def fg(): """Launch shell loop""" global ui ui.c.cmdloop() if __name__ == "__main__": """You can place some script command here for testing purpose""" argv = usage(sys.argv[1:]) ui = ui('gui') ui.launch()
Digital-forensic framework launcher """ import os, sys, getopt if os.name == "posix": try : import dl sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL) except ImportError: import ctypes sys.setdlopenflags(sys.getdlopenflags() | ctypes.RTLD_GLOBAL) from api.manager.manager import ApiManager from ui.ui import ui, usage def fg(): """Launch shell loop""" global ui ui.c.cmdloop() if __name__ == "__main__": """You can place some script command here for testing purpose""" argv = usage(sys.argv[1:]) if argv.graphical == 1: ui = ui('gui', argv.debug, argv.verbosity) else: ui = ui('console', argv.debug, argv.verbosity) if argv.batch != None: ui.cmd("batch " + argv.batch) ui.launch()
# """@package dff Digital-forensic framework launcher """ import os, sys, getopt if os.name == "posix": try : import dl sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL) except ImportError: import ctypes sys.setdlopenflags(sys.getdlopenflags() | ctypes.RTLD_GLOBAL) from api.manager.manager import ApiManager from ui.ui import ui, usage def fg(): """Launch shell loop""" global ui ui.c.cmdloop() if __name__ == "__main__": """You can place some script command here for testing purpose""" argv = usage(sys.argv[1:]) ui = ui('gui', argv.debug) if argv.batch != None: ui.cmd("batch " + argv.batch) ui.launch()
# Solal Jacob <*****@*****.**> # """@package dff Digital-forensic framework launcher """ import os, sys, getopt if os.name == "posix": try: import dl sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL) except ImportError: import ctypes sys.setdlopenflags(sys.getdlopenflags() | ctypes.RTLD_GLOBAL) from api.manager.manager import ApiManager from ui.ui import ui, usage def fg(): """Launch shell loop""" global ui ui.c.cmdloop() if __name__ == "__main__": """You can place some script command here for testing purpose""" argv = usage(sys.argv[1:]) ui = ui('gui') ui.launch()