コード例 #1
0
ファイル: kittywalk.py プロジェクト: wozozo/KittyWalk2
def main(argv=None):
    # Parse options
    if argv is None:
        argv = sys.argv
    if len(argv) > 1:
        opts, args = getopt.getopt(argv[1:], "d")
        if "-d" in [o for o,v in opts]:
            Logger.set_debug_mode()
    Logger.clear()

    app = Application(UserInterface)
    Logger.log("app.start()")
    app.start()
    Logger.log("app.start() finished")
コード例 #2
0
ファイル: topic.py プロジェクト: wozozo/KittyWalk2
    def _load_info(self):
        """Return info dictionary

        This method extracts the content of info file by marshal and
        return the resulting dictionary.  If the file does not exists,
        an empty dictionary is returned.
        """
        try:
            if os.path.exists(self._info_file_path):
                return marshal.load(file(self._info_file_path))
            else:
                return {}
        except EOFError, why:
            Logger.log("EOFError in bbs.Topic._load_info() %s" % why)
            return {}
コード例 #3
0
ファイル: app.py プロジェクト: wozozo/KittyWalk2
 def start(self):
     """Start KittyWalk application"""
     Logger.log("Application started.")
     self._ui.start()
     Logger.log("Application quit.")