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


Python Logutil.info方法代码示例

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


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

示例1: __init__

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
	def __init__(self, *args, **kwargs):
		# Don't put GUI sensitive stuff here (as the xml hasn't been read yet)
		log.info("init ContextMenu")

		self.gui = kwargs["gui"]

		self.doModal()
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:9,代码来源:dialogcontextmenu.py

示例2: updateSelectedRomCollection

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
	def updateSelectedRomCollection(self):

		log.info("updateSelectedRomCollection")

		sites = []
		sites = self.addScraperToSiteList(CONTROL_LIST_SCRAPER1, sites, self.selectedRomCollection)

		self.selectedRomCollection.scraperSites = sites

		# Image Placing Main
		control = self.getControlById(CONTROL_LIST_IMAGEPLACING_MAIN)
		imgPlacingItem = control.getSelectedItem()
		imgPlacingName = imgPlacingItem.getLabel()
		# HACK search key by value
		for item in config.imagePlacingDict.items():
			if item[1] == imgPlacingName:
				imgPlacingName = item[0]
		imgPlacing, errorMsg = self.gui.config.readImagePlacing(imgPlacingName, self.gui.config.tree)
		self.selectedRomCollection.imagePlacingMain = imgPlacing

		# Image Placing Info
		control = self.getControlById(CONTROL_LIST_IMAGEPLACING_INFO)
		imgPlacingItem = control.getSelectedItem()
		imgPlacingName = imgPlacingItem.getLabel()
		# HACK search key by value
		for item in config.imagePlacingDict.items():
			if item[1] == imgPlacingName:
				imgPlacingName = item[0]
		imgPlacing, errorMsg = self.gui.config.readImagePlacing(imgPlacingName, self.gui.config.tree)
		self.selectedRomCollection.imagePlacingInfo = imgPlacing

		# Update values for each of the buttons
		for btn in self._control_buttons:
			control = self.getControlById(btn['control'])
			setattr(self.selectedRomCollection, btn['value'], bool(control.isSelected()))
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:37,代码来源:dialogeditromcollection.py

示例3: __checkGameHasSaveStates

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
	def __checkGameHasSaveStates(self, gameRow, filenameRows):

		if self.romCollection.saveStatePath == '':
			log.debug("No save state path set")
			return ''

		rom = filenameRows[0][0]
		saveStatePath = self.__replacePlaceholdersInParams(self.romCollection.saveStatePath, rom, gameRow)

		saveStateFiles = glob.glob(saveStatePath)

		if len(saveStateFiles) == 0:
			log.debug("No save state files found")
			return ''

		log.info('saveStateFiles found: ' + str(saveStateFiles))

		# don't select savestatefile if ASKNUM is requested in Params
		if re.search('(?i)%ASKNUM%', self.romCollection.saveStateParams):
			return saveStateFiles[0]

		options = [util.localize(32165)]
		for f in saveStateFiles:
			options.append(os.path.basename(f))
		selectedFile = xbmcgui.Dialog().select(util.localize(32166), options)
		# If selections is canceled or "Don't launch statefile" option
		if selectedFile < 1:
			return ''

		return saveStateFiles[selectedFile - 1]
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:32,代码来源:launcher.py

示例4: addScraperToSiteList

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
	def addScraperToSiteList(self, controlId, sites, romCollection):

		log.info("addScraperToSiteList")

		control = self.getControlById(controlId)
		scraperItem = control.getSelectedItem()
		scraper = scraperItem.getLabel()

		if scraper == util.localize(32854):
			return sites

		#check if this site is already available for current RC
		for site in romCollection.scraperSites:
			if site.name == scraper:
				sites.append(site)
				return sites

		siteRow = None
		siteRows = self.gui.config.tree.findall('Scrapers/Site')
		for element in siteRows:
			if element.attrib.get('name') == scraper:
				siteRow = element
				break

		if siteRow is None:
			xbmcgui.Dialog().ok(util.localize(32021), util.localize(32022) % scraper)
			return None

		site, errorMsg = self.gui.config.readScraper(siteRow, romCollection.name, '', '', True, self.gui.config.tree)
		if site is not None:
			sites.append(site)

		return sites
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:35,代码来源:dialogeditromcollection.py

示例5: insertFile

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
    def insertFile(self, fileName, gameId, fileType, romCollectionId, publisherId, developerId):
        log.debug("Begin Insert file: %s" % fileName)

        parentId = None

        # TODO console and romcollection could be done only once per RomCollection
        # fileTypeRow[3] = parent
        if fileType.parent == 'game':
            parentId = gameId
        elif fileType.parent == 'romcollection':
            parentId = romCollectionId
        elif fileType.parent == 'publisher':
            parentId = publisherId
        elif fileType.parent == 'developer':
            parentId = developerId

        log.info("Inserting file with parent {0} (type {1})".format(parentId, fileType.parent))

        fileRow = File(self.gdb).getFileByNameAndTypeAndParent(fileName, fileType.id, parentId)
        if fileRow is None:
            log.info("File does not exist in database. Insert file: %s" % fileName)
            f = File(self.gdb)
            try:
                f.insert((fileName, fileType.id, parentId))
            except Exception, (exc):
                log.warn("Error inserting into database: %s" % fileName)
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:28,代码来源:dbupdate.py

示例6: updateControls

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
	def updateControls(self):

		log.info('updateControls')

		control = self.getControlById(CONTROL_LIST_ROMCOLLECTIONS)
		selectedRomCollectionName = str(control.getSelectedItem().getLabel())

		self.selectedRomCollection = self.gui.config.getRomCollectionByName(selectedRomCollectionName)
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:10,代码来源:dialogdeleteromcollection.py

示例7: walkDownPath

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
    def walkDownPath(self, files, romPath, maxFolderDepth):

        log.info("alkDownPath romPath: %s" % romPath)

        files = self.walkDown(files, romPath, maxFolderDepth)
        log.info("files after walkDown = %s" % files)

        return files
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:10,代码来源:dbupdate.py

示例8: selectScrapersInList

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
	def selectScrapersInList(self, sitesInRomCollection, sitesInList):

		log.info("selectScrapersInList")

		if len(sitesInRomCollection) >= 1:
			self.selectItemInList(sitesInRomCollection[0].name, CONTROL_LIST_SCRAPER1)
		else:
			self.selectItemInList(util.localize(32854), CONTROL_LIST_SCRAPER1)
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:10,代码来源:dialogeditromcollection.py

示例9: __init__

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
	def __init__(self, *args, **kwargs):
		log.info("init Edit Rom Collection")

		self.gui = kwargs["gui"]
		self.romCollections = self.gui.config.romCollections
		self.scraperSites = self.gui.config.scraperSites

		self.doModal()
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:10,代码来源:dialogeditromcollection.py

示例10: open_xml_url

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
    def open_xml_url(self, **kwargs):
        log.info('Retrieving url %s, params = %s' %(kwargs['url'], kwargs['params']))

        r = requests.get(kwargs['url'], headers=self._headers, params=kwargs['params'])

        log.debug(u"Retrieving {0} as XML - HTTP{1}".format(r.url, r.status_code))

        # Need to ensure we are sending back Unicode text
        return r.text.encode('utf-8')
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:11,代码来源:web_scraper.py

示例11: selectItemInList

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
	def selectItemInList(self, options, itemName, controlId):

		log.info('selectItemInList')

		for i in range(0, len(options)):
			option = options[i]
			if itemName == option:
				control = self.getControlById(controlId)
				control.selectItem(i)
				break
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:12,代码来源:dialogdeleteromcollection.py

示例12: findFilesByGameDescription

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
    def findFilesByGameDescription(self, key, fileDict):

        log.info("searching for Key: %s" % key)

        try:
            filename = fileDict[key]
            log.info("result found: %s" % filename)
        except KeyError:
            filename = None

        return filename
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:13,代码来源:dbupdate.py

示例13: compareNames

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
	def compareNames(self, gamename, searchkey, checkSubtitle):
		if checkSubtitle:
			if searchkey.find(gamename) > -1:
				log.info("%s is a subtitle of %s. Using result %s" % (gamename, searchkey, searchkey))
				return True
		else:
			if gamename == searchkey:
				log.info("Perfect match. Using result %s" % searchkey)
				return True

		return False
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:13,代码来源:matcher.py

示例14: getScrapingMode

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
	def getScrapingMode(self):
		mode = 0
		scrape_options = {util.SCRAPING_OPTION_AUTO_ACCURATE_TXT: 0,
						  util.SCRAPING_OPTION_INTERACTIVE_TXT: 1}
		try:
			mode = scrape_options[__addon__.getSetting(util.SETTING_RCB_SCRAPINGMODE)]
		except KeyError:
			pass

		log.info("Scraping mode: {0}".format(mode))

		return mode
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:14,代码来源:matcher.py

示例15: onInit

# 需要导入模块: from util import Logutil [as 别名]
# 或者: from util.Logutil import info [as 别名]
	def onInit(self):
		log.info('onInit Remove Rom Collection')

		# Rom Collections
		log.info('build rom collection list')

		self.addItemsToList(CONTROL_LIST_ROMCOLLECTIONS, self.gui.config.getRomCollectionNames())

		# Delete Options
		rcDeleteOptions = [util.localize(32137), util.localize(32138)]
		self.addItemsToList(CONTROL_LIST_DELETEOPTIONS, rcDeleteOptions, properties=['RCollection', 'Roms'])
		self.updateControls()
开发者ID:bruny,项目名称:romcollectionbrowser,代码行数:14,代码来源:dialogdeleteromcollection.py


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