def __init__(self): """ initialize pitivi with the command line arguments """ Loggable.__init__(self) # init logging as early as possible so we can log startup code enable_color = os.environ.get('PITIVI_DEBUG_NO_COLOR', '0') in ('', '0') log.init('PITIVI_DEBUG', enable_color) self.info('starting up') # store ourself in the instance global if instance.PiTiVi: raise RuntimeWarning( _("There is already a %s instance, please inform the developers by filing a bug at http://bugzilla.gnome.org/enter_bug.cgi?product=pitivi" ) % APPNAME) instance.PiTiVi = self self.projects = [] self.current = None # get settings self.settings = GlobalSettings() self.threads = ThreadMaster() #self.screencast = False self.plugin_manager = PluginManager( self.settings.get_local_plugin_path(), self.settings.get_plugin_settings_path()) self.effects = Magician() self.deviceprobe = get_probe() self.projectManager = ProjectManager() self._connectToProjectManager(self.projectManager) self.action_log = UndoableActionLog() self.debug_action_log_observer = DebugActionLogObserver() self.debug_action_log_observer.startObserving(self.action_log) self.timelineLogObserver = TimelineLogObserver(self.action_log) self.sourcelist_log_observer = SourceListLogObserver(self.action_log)