本文整理汇总了Python中application.Application.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Application.__init__方法的具体用法?Python Application.__init__怎么用?Python Application.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类application.Application
的用法示例。
在下文中一共展示了Application.__init__方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import __init__ [as 别名]
def __init__(self, pkg, cfg):
Application.__init__(self, pkg, cfg)
self.type_id = 'inputmethod'
self.categories = [ 'Addons', 'InputSources' ]
self.icon = 'system-run-symbolic'
self.cached_icon = False
self.requires_appdata = True
示例2: __init__
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import __init__ [as 别名]
def __init__(self, pkg, cfg):
Application.__init__(self, pkg, cfg)
self.type_id = u'codec'
self.requires_appdata = True
self.categories = []
self.cached_icon = False
self.icon = 'application-x-executable'
self.categories.append(u'Addons')
self.categories.append(u'Codecs')
# use the pkgname as the id
app_id = pkg.name
app_id = app_id.replace('gstreamer1-', '')
app_id = app_id.replace('gstreamer-', '')
app_id = app_id.replace('plugins-', '')
self.set_id('gstreamer-' + app_id)
# map the ID to a nice codec name
self.codec_name = {}
csvfile = open('../data/gstreamer-data.csv', 'r')
data = csv.reader(csvfile)
for row in data:
if row[1] == '-':
continue
codec_id = row[0][31:-3]
self.codec_name[codec_id] = row[1].split('|')
csvfile.close()
示例3: __init__
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import __init__ [as 别名]
def __init__(self, conf, options, output_prefix, init_equations=True, **kwargs):
"""`kwargs` are passed to ProblemDefinition.from_conf()
Command-line options have precedence over conf.options."""
Application.__init__(self, conf, options, output_prefix)
self.setup_options()
is_eqs = init_equations
if hasattr(options, "solve_not") and options.solve_not:
is_eqs = False
self.problem = ProblemDefinition.from_conf(conf, init_equations=is_eqs, **kwargs)
self.setup_output_info(self.problem, self.options)
示例4: __init__
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import __init__ [as 别名]
def __init__(self):
Application.__init__(self)
self.xorg_conf_path = "/etc/X11/xorg.conf"
self.xorg_conf_d_path = "/etc/X11/xorg.conf.d"
self.xorg_conf_backup_path = "%s-backup" %(self.xorg_conf_path)
self.xorg_conf_d_backup_path = "%s-backup" %(self.xorg_conf_d_path)
self.pages['welcome'] = self.create_welcome_page()
self.pages['actions'] = self.create_actions_page()
self.pages['reconfigure'] = self.create_reconfigure_page()
self.pages['troubleshoot'] = self.create_troubleshoot_page()
# Refresh
self.update_frame()
self.window.show_all()
self.on_page(None, 'welcome')
示例5: __init__
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import __init__ [as 别名]
def __init__( self, conf, options, output_prefix, **kwargs ):
"""`kwargs` are passed to ProblemDefinition.from_conf()
Command-line options have precedence over conf.options."""
Application.__init__( self, conf, options, output_prefix )
self.setup_options()
if options.output_filename_trunk is None:
ofn_trunk = op.join( self.app_options.output_dir,
io.get_trunk( conf.filename_mesh ) )
options.output_filename_trunk = ofn_trunk
else:
ofn_trunk = options.output_filename_trunk
self.problem = ProblemDefinition.from_conf( conf, **kwargs )
self.problem.ofn_trunk = ofn_trunk
self.problem.output_dir = self.app_options.output_dir
if hasattr( options, 'output_format' ):
self.problem.output_format = options.output_format
else:
self.problem.output_format = self.app_options.output_format
示例6: __init__
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import __init__ [as 别名]
def __init__(self, pkg, cfg):
Application.__init__(self, pkg, cfg)
self.type_id = 'font'
self.categories = [ 'Addons', 'Fonts' ]
self.thumbnail_screenshots = False
示例7: __init__
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import __init__ [as 别名]
def __init__(self, pkg, cfg):
Application.__init__(self, pkg, cfg)
self.type_id = 'desktop'
示例8: __init__
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import __init__ [as 别名]
def __init__(self, pkg, cfg):
Application.__init__(self, pkg, cfg)
self.type_id = u"font"
self.categories = [u"Addons", u"Fonts"]
self.thumbnail_screenshots = False
self.requires_appdata = True