Преглед изворни кода

add clear screen functionality, to make it safer ...

Oz Nahum пре 12 година
родитељ
комит
51b3de883d
1 измењених фајлова са 7 додато и 1 уклоњено
  1. 7 1
      pwman/ui/cli.py

+ 7 - 1
pwman/ui/cli.py

@@ -458,12 +458,18 @@ class PwmanCli(cmd.Cmd):
         except Exception, e:
         except Exception, e:
             self.error(e)
             self.error(e)
     
     
+    def do_cls(self,args):
+        os.system('clear')
     ##
     ##
     ## Help functions
     ## Help functions
     ##
     ##
     def usage(self, string):
     def usage(self, string):
         print "Usage: %s" % (string)
         print "Usage: %s" % (string)
-        
+    
+    def help_cls(self):
+        self.usage("cls")
+        print "Clear the Screen from information."
+
     def help_ls(self):
     def help_ls(self):
         self.help_list()
         self.help_list()