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


Python Application.__init__方法代码示例

本文整理汇总了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
开发者ID:epico,项目名称:fedora-appstream,代码行数:9,代码来源:input_method.py

示例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()
开发者ID:pombredanne,项目名称:fedora-appstream,代码行数:29,代码来源:codec.py

示例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)
开发者ID:sdurve,项目名称:sfepy,代码行数:15,代码来源:pde_solver_app.py

示例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')
开发者ID:thnguyn2,项目名称:ECE_527_MP,代码行数:18,代码来源:welcome.py

示例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
开发者ID:certik,项目名称:sfepy,代码行数:24,代码来源:simple_app.py

示例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
开发者ID:epico,项目名称:fedora-appstream,代码行数:7,代码来源:font_file.py

示例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'
开发者ID:epico,项目名称:fedora-appstream,代码行数:5,代码来源:desktop_file.py

示例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
开发者ID:pombredanne,项目名称:fedora-appstream,代码行数:8,代码来源:font_file.py


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