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


Python ResourcesConfiguration.extractAPIKeyDefinitionFromLocalFile方法代码示例

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


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

示例1: __init__

# 需要导入模块: from netzob.Common.ResourcesConfiguration import ResourcesConfiguration [as 别名]
# 或者: from netzob.Common.ResourcesConfiguration.ResourcesConfiguration import extractAPIKeyDefinitionFromLocalFile [as 别名]
    def __init__(self):
        self.apiKey = ResourcesConfiguration.extractAPIKeyDefinitionFromLocalFile()
        self.disableRemoteCertificateVerification = False

        self.targetBugReport = "{0}/projects/{1}".format(BugReporter.URL_TARGET_BUG_REPORT, BugReporter.PROJECT_NAME_BUG_REPORT)

        self.log = logging.getLogger(__name__)
        self.customFieldSHA2ID = "5"
        self.currentReport = None
开发者ID:EnjoyHacking,项目名称:netzob,代码行数:11,代码来源:BugReporter.py

示例2: __init__

# 需要导入模块: from netzob.Common.ResourcesConfiguration import ResourcesConfiguration [as 别名]
# 或者: from netzob.Common.ResourcesConfiguration.ResourcesConfiguration import extractAPIKeyDefinitionFromLocalFile [as 别名]
    def __init__(self, controller, parent=None):
        self.builder = Gtk.Builder()
        self.builder.add_from_file(os.path.join(ResourcesConfiguration.getStaticResources(),
                                                "ui",
                                                "workspaceConfigurationDialog.glade"))
        self._getObjects(self.builder,
                         ["workspaceConfigurationDialog",
                          "advancedLoggingCombobox",
                          "advancedBugreportingEntry",
                          "advancedBugreportingCheckbox",
                          "advancedBugreportingTestkey",
                          "advancedBugreportingTestkeySpinner",
                          "projectsTreestore1",
                          "projectCurrentName",
                          "projectCurrentDate",
                          "projectCurrentSymbolsCount",
                          "projectCurrentMessagesCount",
                          "projectsDuplicateButton",
                          "projectsDeleteButton",
                          "projectsExportButton",
                          "projectsTreeviewSelection",
                          "projectsConfigureButton",
                          "workspaceConfigurationActionGroup",
                          ])

        self.controller = controller
        self.workspaceConfigurationDialog.set_transient_for(parent)

        # Set combobox to the configured log level
        model = self.advancedLoggingCombobox.get_model()
        treeIter = model.get_iter_first()
        while treeIter is not None:
            if model[treeIter][0] == self.controller._loggingConfiguration.getLoggingLevel():
                self.advancedLoggingCombobox.set_active_iter(treeIter)
                break
            treeIter = model.iter_next(treeIter)

        # Update API key
        key = ResourcesConfiguration.extractAPIKeyDefinitionFromLocalFile()
        self.advancedBugreportingEntry.set_text(key or "")

        # Set the 'enable bug reporting' toggle
        enableBugReporting = controller.workspace.enableBugReporting
        self.advancedBugreportingCheckbox.set_active(enableBugReporting)
        self.refreshEnableBugReporting(enableBugReporting)

        # Updating the "Defined projects" list
        self.refreshProjectList()

        # Getting the popup menu
        self.uiManager = Gtk.UIManager()
        self.uiManager.insert_action_group(self.workspaceConfigurationActionGroup)
        self.uiManager.add_ui_from_file(os.path.join(ResourcesConfiguration.getStaticResources(), "ui", "workspaceConfigurationPopupMenu.ui"))
        self.popup = self.uiManager.get_widget("/PopupMenu")

        # Finally, connect signals to the controller
        self.builder.connect_signals(self.controller)
开发者ID:EnjoyHacking,项目名称:netzob,代码行数:59,代码来源:WorkspaceConfigurationView.py

示例3: currentWorkspaceHasChanged

# 需要导入模块: from netzob.Common.ResourcesConfiguration import ResourcesConfiguration [as 别名]
# 或者: from netzob.Common.ResourcesConfiguration.ResourcesConfiguration import extractAPIKeyDefinitionFromLocalFile [as 别名]
    def currentWorkspaceHasChanged(self):
        """currentWorkspaceHasChanged:
        Execute the operations which must be done when
        the current workspace has changed :
        - Update the view,
        - Save the new workspace."""
        if self.controller.getCurrentWorkspace() is not None:
            ResourcesConfiguration.generateUserFile(self.controller.getCurrentWorkspace().getPath(), ResourcesConfiguration.extractAPIKeyDefinitionFromLocalFile())

        self.currentProjectHasChanged()
        self.updateSwitchProjectMenu(self.controller.getCurrentWorkspace().getNameOfProjects())
开发者ID:EnjoyHacking,项目名称:netzob,代码行数:13,代码来源:NetzobMainView.py


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