Exemplo n.º 1
0
def config():
   cparse = config_parser(sys.argv[2])
   print cparse.get_opt("exclude")
   print cparse.get_opt("exclude", profile="kevin")
   print cparse.get_options(profile='vbox')
   aparse = arg_parser(sys.argv[1:], opt=cparse.get_options())
   aparse = arg_parser(sys.argv[1:])
   print aparse.options
   print aparse.options['exclude']
   print cparse.get_opt('name', profile='vbox')
Exemplo n.º 2
0
   bparse = backup_parser(sys.argv[2])
   backups = bparse.read_backup_file()

   for key in backups.keys():
      print (key + " {\n")
      for v in backups[key]:
         print (v + "\n")
      print ("}\n")

   print max(backups.keys())


def config():
   cparse = config_parser(sys.argv[2])
   print cparse.get_opt("exclude")
   print cparse.get_opt("exclude", profile="kevin")
   print cparse.get_options(profile='vbox')
   aparse = arg_parser(sys.argv[1:], opt=cparse.get_options())
   aparse = arg_parser(sys.argv[1:])
   print aparse.options
   print aparse.options['exclude']
   print cparse.get_opt('name', profile='vbox')

if sys.argv[1] == 'config':
   config()
elif sys.argv[1] == 'backup':
   backup()
else:
   aparse = arg_parser(sys.argv[1:])
   print aparse.options