当前位置: 首页>>代码示例>>Python>>正文


Python BaseConsole.__init__方法代码示例

本文整理汇总了Python中base_console.BaseConsole.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python BaseConsole.__init__方法的具体用法?Python BaseConsole.__init__怎么用?Python BaseConsole.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在base_console.BaseConsole的用法示例。


在下文中一共展示了BaseConsole.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
    def __init__(self, greeting='RockStor'):
        BaseConsole.__init__(self)
        self.greeting = greeting
        self.prompt = greeting + '>'

        self.intro = ('%s\nWelcome to Rockstor. Smart Powerful Open Storage '
                      'Cloud Builders' % ASCII_LOGO)
开发者ID:aliamir,项目名称:rockstor-core,代码行数:9,代码来源:rock_cli.py

示例2: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
 def __init__(self, prompt, share):
     BaseConsole.__init__(self)
     self.share = share
     self.parent_prompt = prompt
     self.greeting = ('%s %s' % (self.parent_prompt, self.share))
     self.prompt = ('%s>' % self.greeting)
     self.url = ('%sshares/%s/' % (BaseConsole.url, self.share))
开发者ID:aliamir,项目名称:rockstor-core,代码行数:9,代码来源:share_detail_console.py

示例3: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
 def __init__(self, greeting='RockStor'):
     BaseConsole.__init__(self)
     self.greeting = greeting
     self.prompt = greeting + '>'
     self.intro = ('%s\nWelcome to Rockstor. Smart Powerful Open Storage '
                   'Cloud Builders' % ASCII_LOGO)
     self.user_hist_file = os.path.expanduser('~') + '/.rcli.hist'
     try:
         readline.read_history_file(self.user_hist_file)
     except:
         pass
开发者ID:sigkill,项目名称:rockstor-core,代码行数:13,代码来源:rock_cli.py

示例4: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
 def __init__(self, greeting='Rockstor'):
     self.user = pwd.getpwuid(os.getuid())[0]
     self.greeting = self.user + '@' + greeting
     self.prompt = self.greeting + '> '
     self.intro = ('%s\nWelcome to Rockstor. The Smart Open Storage '
                   'Platform.' % ASCII_LOGO)
     self.user_hist_file = os.path.expanduser('~') + '/.rcli.hist'
     try:
         readline.read_history_file(self.user_hist_file)
     except:
         pass
     finally:
         BaseConsole.__init__(self)
开发者ID:rcgade,项目名称:rockstor-core,代码行数:15,代码来源:rock_cli.py

示例5: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
 def __init__(self, greeting):
     BaseConsole.__init__(self)
     self.greeting = greeting + ' Shares'
     self.prompt = self.greeting + '> '
     self.url = ('%sshares' % BaseConsole.url)
开发者ID:MFlyer,项目名称:rockstor-core,代码行数:7,代码来源:shares_console.py

示例6: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
 def __init__(self, prompt):
     BaseConsole.__init__(self)
     self.prompt = prompt + ' APIKey> '
     self.baseurl = ('%soauth_app' % BaseConsole.url)
开发者ID:Ajunboys,项目名称:rockstor-core,代码行数:6,代码来源:api_keys.py

示例7: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
 def __init__(self, prompt, share):
     BaseConsole.__init__(self)
     self.share = share
     self.prompt = prompt + ' iscsi>'
     self.url = ('%sshares/%s/iscsi/' % (BaseConsole.url, self.share))
开发者ID:Ajunboys,项目名称:rockstor-core,代码行数:7,代码来源:share_iscsi_console.py

示例8: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
 def __init__(self, prompt):
     BaseConsole.__init__(self)
     self.greeting = 'Smart Manager'
     self.pprompt = prompt
     self.prompt = ('%s %s>' % (self.pprompt, self.greeting))
     self.baseurl = BaseConsole.url + 'sm/stap/'
开发者ID:adommeti,项目名称:rockstor-core,代码行数:8,代码来源:sm_console.py

示例9: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
 def __init__(self, prompt):
     BaseConsole.__init__(self)
     self.prompt = prompt + ' SFTP>'
     self.url = BaseConsole.url + 'sm/services/sftp/'
开发者ID:Ajunboys,项目名称:rockstor-core,代码行数:6,代码来源:sftp_console.py

示例10: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
 def __init__(self, prompt, share):
     BaseConsole.__init__(self)
     self.prompt = prompt + ' Samba>'
     self.share = share
     self.url = ('%sshares/%s/samba/' % (BaseConsole.url, self.share))
开发者ID:Ajunboys,项目名称:rockstor-core,代码行数:7,代码来源:share_smb_console.py

示例11: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
 def __init__(self, prompt):
     BaseConsole.__init__(self)
     self.parent_prompt = prompt
     self.greeting = ('%s BackupPlugin' % self.parent_prompt)
     self.prompt = ('%s>' % self.greeting)
     self.url = ('%splugin/backup' % BaseConsole.url)
开发者ID:MFlyer,项目名称:rockstor-core,代码行数:8,代码来源:backup_plugin_console.py

示例12: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
 def __init__(self, prompt):
     BaseConsole.__init__(self)
     self.greeting = 'Services'
     self.pprompt = prompt
     self.prompt = ('%s %s>' % (self.pprompt, self.greeting))
开发者ID:stennety,项目名称:rockstor-core,代码行数:7,代码来源:services_console.py

示例13: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
 def __init__(self, prompt):
     BaseConsole.__init__(self)
     self.greeting = 'Users'
     self.pprompt = prompt
     self.prompt = ('%s %s>' % (self.pprompt, self.greeting))
     self.base_url = ('%s/users/' % BaseConsole.url)
开发者ID:Ajunboys,项目名称:rockstor-core,代码行数:8,代码来源:users_console.py

示例14: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
 def __init__(self, prompt):
     BaseConsole.__init__(self)
     self.greeting = "Services"
     self.pprompt = prompt
     self.prompt = "%s %s>" % (self.pprompt, self.greeting)
开发者ID:Stoney49th,项目名称:rockstor-core,代码行数:7,代码来源:services_console.py

示例15: __init__

# 需要导入模块: from base_console import BaseConsole [as 别名]
# 或者: from base_console.BaseConsole import __init__ [as 别名]
 def __init__(self, prompt):
     BaseConsole.__init__(self)
     self.prompt = prompt + ' Pool>'
开发者ID:Ajunboys,项目名称:rockstor-core,代码行数:5,代码来源:pool_detail_console.py


注:本文中的base_console.BaseConsole.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。