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


Python Utils.get_random_name方法代码示例

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


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

示例1: _check_for_scattered_prev_cffile

# 需要导入模块: from Utils import Utils [as 别名]
# 或者: from Utils.Utils import get_random_name [as 别名]
 def _check_for_scattered_prev_cffile(self, cffolder):
     # This method workarounds a border case that happens when we have 2 files in a folder
     # In wich the first file occupies more than one cab... When this happens, when the second
     # cffile gets added, it cannot share the scattered CFFOLDER because it doesn't work..
     # We need to create an anonymous CFFOLDER here and return it
     last_cffile = cffolder.cffile_list[-1]
     if last_cffile.iFolder & CFFILE.ifoldCONTINUED_FROM_PREV == CFFILE.ifoldCONTINUED_FROM_PREV:
         anonymous_folder = self._create_cffolder(Utils.get_random_name(10))
         self.cffolder_list.append(anonymous_folder)
         return anonymous_folder
     return cffolder
开发者ID:n3k,项目名称:PyCAB,代码行数:13,代码来源:CabWriter.py

示例2: __generate_folder_name

# 需要导入模块: from Utils import Utils [as 别名]
# 或者: from Utils.Utils import get_random_name [as 别名]
 def __generate_folder_name(self):
     i = 0
     base_name = Utils.get_random_name(5) + "_folder_"
     while True:
         yield base_name + str(i)
         i += 1
开发者ID:n3k,项目名称:PyCAB,代码行数:8,代码来源:CabExtractor.py


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