#
#coding:utf-8
#
#Author  : QCSun
#Email   : qcsun@sunhpc.com
#Times   : 2023-04-14 05:21:02
#WebSite : https://www.sunhpc.com

import os
import re
import sys
import sunhpc
import readline
from sunhpc.core.interpreter import SunhpcInterpreter

class Struct(object):
    pass

class command(sunhpc.commands.build.command):
    pass

class Command(command, SunhpcInterpreter):
#class Command(command):
    """
    Initialzed the sunhpc database.
    """
    def run(self, params, args):
        SunhpcInterpreter.__init__(self)

        self.results            = {}
        self.results['country'] = 'CN'
        self.results['state']   = 'LiaoNing'
        self.results['city']    = 'Dalian'
        self.results['url']     = 'https://www.sunhpc.com'

        self.current_keys       = list(self.results.keys())
        self.current_values     = self.results

        self.start()

    def preceding(self):
        print('  下列是数据库的初始化配置的基础选项.')
        print('  可以使用命令 set key=value 进行修改:\n')
        self.dictOutput(self.results)
        print('  ---------------------------------------------\n')

    def _SunhpcInterpreter__show_all(self, root=''):
        
        self.dictOutput(self.current_values)



































