コード例 #1
0
ファイル: postoffice.py プロジェクト: fortran95/postoffice
    def cmdloop(self, intro=None):
        selfcheck = self.do_selfcheck("silent")

        os.system("clear")

        emptyline = "*" + 78 * " " + "*"
        print "*" * 80
        print "*" + colorshell(" Welcome to Postoffice ", 1, 0).center(88, " ") + "*"
        print "* This is user interface to top-secret system Xi's frontend." + 19 * " " + "*"
        if not isroot:
            print "* %-87s *" % colorshell("WARNING: You are not root. Some commands may not work.", 31, 1)
        print emptyline
        print "* %-76s *" % "Xi-System  Copyright (C) 2012  NERV"
        print "* %-76s *" % "This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'."  # FIXME show w
        print "* %-76s *" % "This is free software, and you are welcome to redistribute it"
        print "* %-76s *" % "under certain conditions; type `show c' for details."  # FIXME show c
        print emptyline
        print "* %-74s *" % "To get help: %s" % colorshell("help", 1, 0)
        print "* %-66s *" % "To exit: %s or %s or %s" % (
            colorshell("exit", 1, 0),
            colorshell("quit", 1, 0),
            colorshell("<Ctrl+D>", 1, 0),
        )
        print emptyline
        print "* %-59s *" % "System Checksum: %s" % colorshell(
            tool_selfcheck.friendly_display(selfcheck["total"]).strip(), 31, 1
        )
        print "* %-56s *" % "%s checking system integrity with: %s" % (
            colorshell("ALWAYS remember", 31, 1),
            colorshell("selfcheck", 1, 0),
        )
        print "*" * 80
        Cmd.cmdloop(self, intro)
コード例 #2
0
ファイル: postoffice.py プロジェクト: fortran95/postoffice
 def _show_usage(self, cmdfmt, desc):
     print "%s: %s\n%s" % (colorshell("Usage", 1, 4), cmdfmt, desc)