def __init__ (self, image) :
cmd.Cmd.__init__(self)
self.__image = image
self.__wd = image['system']
self.__base = self.__wd
self.__user = image['meta']['user']
self.__host = image['meta']['hostname']
col = color['green']
symb = '$'
if self.__image['meta']['UID'] == 0 :
col = color['red']
symb = '#'
self.prompt_format = self.prompt_format % (col, self.__user, self.__host, color['END'], symb)
self.change_prompt(self.__wd)
评论列表
文章目录