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


Python TextEncoder.strip方法代码示例

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


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

示例1: __typedAName

# 需要导入模块: from pandac.PandaModules import TextEncoder [as 别名]
# 或者: from pandac.PandaModules.TextEncoder import strip [as 别名]
 def __typedAName(self, *args):
     self.notify.debug('__typedAName')
     self.nameEntry['focus'] = 0
     name = self.nameEntry.get()
     name = TextEncoder().decodeText(name)
     name = name.strip()
     name = TextEncoder().encodeWtext(name)
     self.nameEntry.enterText(name)
     problem = self.nameIsValid(self.nameEntry.get())
     if problem:
         self.rejectName(problem)
         return
     self.checkNameTyped(justCheck=True)
开发者ID:Teku16,项目名称:Toontown-Crystal-Master,代码行数:15,代码来源:NameShop.py

示例2: _typedAName

# 需要导入模块: from pandac.PandaModules import TextEncoder [as 别名]
# 或者: from pandac.PandaModules.TextEncoder import strip [as 别名]
 def _typedAName(self, *args):
     self.nameEntry['focus'] = 0
     name = self.nameEntry.get()
     name = TextEncoder().decodeText(name)
     name = name.strip()
     name = TextEncoder().encodeWtext(name)
     self.nameEntry.enterText(name)
     self.notify.debug('Chosen name: %s' % self.nameEntry.get())
     problem = NameCheck.checkName(name, [
         self._checkNpcNames], font = self.nameEntry.getFont())
     if problem:
         print problem
         self.nameEntry.enterText('')
     else:
         self.fsm.request('Approved')
开发者ID:XamarinDeveloper,项目名称:Pirates-Online-Source,代码行数:17,代码来源:NameGUI.py

示例3: complete

# 需要导入模块: from pandac.PandaModules import TextEncoder [as 别名]
# 或者: from pandac.PandaModules.TextEncoder import strip [as 别名]
 def complete(self):
     self.nameEntry['focus'] = 0
     name = self.nameEntry.get()
     name = TextEncoder().decodeText(name)
     name = name.strip()
     name = TextEncoder().encodeWtext(name)
     self.nameEntry.enterText(name)
     self.notify.debug('Chosen name: %s' % name)
     if self.customName:
         problem = NameCheck.checkName(name, [
             self._checkNpcNames], font = self.nameEntry.getFont())
         if problem:
             print problem
             self.nameEntry.enterText('')
         else:
             self.fsm.request('Done')
     else:
         self.fsm.request('Done')
开发者ID:XamarinDeveloper,项目名称:Pirates-Online-Source,代码行数:20,代码来源:NameGUI.py

示例4: getTypeANameProblem

# 需要导入模块: from pandac.PandaModules import TextEncoder [as 别名]
# 或者: from pandac.PandaModules.TextEncoder import strip [as 别名]
 def getTypeANameProblem(self, callback):
     if not self.customName:
         callback(None)
     else:
         problem = None
         name = self.nameEntry.get()
         name = TextEncoder().decodeText(name)
         name = name.strip()
         name = TextEncoder().encodeWtext(name)
         self.nameEntry.enterText(name)
         problem = NameCheck.checkName(self.nameEntry.get(), [
             self._checkNpcNames], font = self.nameEntry.getFont())
         if problem:
             callback(problem)
         elif self.cr:
             self.ignore(self.cr.getWishNameResultMsg())
             self.acceptOnce(self.cr.getWishNameResultMsg(), self._handleSetWishnameResult)
             self._nameCheckCallback = callback
             self._sendSetWishname(justCheck = True)
             return None
开发者ID:XamarinDeveloper,项目名称:Pirates-Online-Source,代码行数:22,代码来源:NameGUI.py

示例5: _getName

# 需要导入模块: from pandac.PandaModules import TextEncoder [as 别名]
# 或者: from pandac.PandaModules.TextEncoder import strip [as 别名]
 def _getName(self):
     newName = ''
     if self.mode == self._NameGUI__MODE_TYPEANAME:
         newName = self.nameEntry.get()
         newName = TextEncoder().decodeText(newName)
         newName = newName.strip()
         newName = TextEncoder().encodeWtext(newName)
     else:
         newName += self.names[0]
         if len(newName) > 0 and len(self.names[1]) > 0:
             newName += ' '
         
         newName += self.names[1]
         if len(newName) > 0 and len(self.names[2]) > 0:
             newName += ' '
         
         newName += self.names[2]
         if self.names[2] in PL.PirateNames_LastNamePrefixesCapped:
             newName += self.names[3].capitalize()
         else:
             newName += self.names[3]
     return newName
开发者ID:XamarinDeveloper,项目名称:Pirates-Online-Source,代码行数:24,代码来源:NameGUI.py

示例6: match

# 需要导入模块: from pandac.PandaModules import TextEncoder [as 别名]
# 或者: from pandac.PandaModules.TextEncoder import strip [as 别名]
 def match(npcName, name = name):
     name = TextEncoder().encodeWtext(name)
     name = name.strip()
     return TextEncoder.upper(npcName) == TextEncoder.upper(name)
开发者ID:Teku16,项目名称:Toontown-Crystal-Master,代码行数:6,代码来源:NameShop.py


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