本文整理汇总了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)
示例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))
示例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
示例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)
示例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)
示例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)
示例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))
示例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/'
示例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/'
示例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))
示例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)
示例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))
示例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)
示例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)
示例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>'