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


Python GitHub.list_files方法代码示例

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


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

示例1: lp_layout_list

# 需要导入模块: from github import GitHub [as 别名]
# 或者: from github.GitHub import list_files [as 别名]
 def lp_layout_list(self, upstream=None):
     """
     search_order : list layouts from upstream if mentioned
                    list layouts from core package
     """
     if upstream is None:
         l_files = list_files(self.base_path + "/inventory_layouts")
         return l_files
     else:
         g = GitHub(upstream)
         l_files = []
         files = g.list_files("inventory_layouts")
         return files
开发者ID:greg-hellings,项目名称:linch-pin,代码行数:15,代码来源:api.py

示例2: lp_topo_list

# 需要导入模块: from github import GitHub [as 别名]
# 或者: from github.GitHub import list_files [as 别名]
 def lp_topo_list(self, upstream=None):
     """
     search_order : list topologies from upstream if mentioned
                    list topologies from current folder
     """
     if upstream is None:
         t_files = list_files(self.base_path + "/ex_topo")
         return t_files
     else:
         print "getting from upstream"
         g = GitHub(upstream)
         t_files = []
         files = g.list_files("ex_topo")
         return files
开发者ID:greg-hellings,项目名称:linch-pin,代码行数:16,代码来源:api.py

示例3: lp_layout_get

# 需要导入模块: from github import GitHub [as 别名]
# 或者: from github.GitHub import list_files [as 别名]
 def lp_layout_get(self, layout, upstream=None):
     """
     search_order : get layouts from upstream if mentioned
                    get layouts from core package
     """
     if upstream is None:
         get_file(self.base_path + "/inventory_layouts/" + layout,
                  "./layouts/")
     else:
         g = GitHub(upstream)
         files = g.list_files("inventory_layouts")
         link = filter(lambda link: link['name'] == layout, files)
         link = link[0]["download_url"]
         get_file(link, "./layouts", True)
         return link
开发者ID:greg-hellings,项目名称:linch-pin,代码行数:17,代码来源:api.py

示例4: lp_topo_get

# 需要导入模块: from github import GitHub [as 别名]
# 或者: from github.GitHub import list_files [as 别名]
 def lp_topo_get(self, topo, upstream=None):
     """
     search_order : get topologies from upstream if mentioned
                    get topologies from core package
     # need to add checks for ./topologies
     """
     if upstream is None:
         get_file(self.base_path + "/ex_topo/" + topo, "./topologies/")
     else:
         g = GitHub(upstream)
         files = g.list_files("ex_topo")
         link = filter(lambda link: link['name'] == topo, files)
         link = link[0]["download_url"]
         get_file(link, "./topologies", True)
         return link
开发者ID:greg-hellings,项目名称:linch-pin,代码行数:17,代码来源:api.py


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