python类glob1()的实例源码

filebased.py 文件源码 项目:travlr 作者: gauravkulkarni96 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def _list_cache_files(self):
        """
        Get a list of paths to all the cache files. These are all the files
        in the root cache dir that end on the cache_suffix.
        """
        if not os.path.exists(self._dir):
            return []
        filelist = [os.path.join(self._dir, fname) for fname
                    in glob.glob1(self._dir, '*%s' % self.cache_suffix)]
        return filelist
bitmap.py 文件源码 项目:CodeReader 作者: jasonrbr 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def demo():
    import glob
    winDir=win32api.GetWindowsDirectory()
    for fileName in glob.glob1(winDir, '*.bmp')[:2]:
        bitmapTemplate.OpenDocumentFile(os.path.join(winDir, fileName))
utils.py 文件源码 项目:kaggle_amazon 作者: asanakoy 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def get_last_checkpoint(model_dir):
    list_of_models = glob.glob1(model_dir, '*.hdf5')
    ckpt_epochs = [int(x.split('-')[-2]) for x in list_of_models]
    print ckpt_epochs
    latest_model_name = list_of_models[np.argsort(ckpt_epochs)[-1]]
    epoch_num = int(latest_model_name.split('-')[-2])
    print 'last snapshot:', latest_model_name
    print 'last epoch=', epoch_num
    return os.path.join(model_dir, latest_model_name), epoch_num
filebased.py 文件源码 项目:logo-gen 作者: jellene4eva 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def _list_cache_files(self):
        """
        Get a list of paths to all the cache files. These are all the files
        in the root cache dir that end on the cache_suffix.
        """
        if not os.path.exists(self._dir):
            return []
        filelist = [os.path.join(self._dir, fname) for fname
                    in glob.glob1(self._dir, '*%s' % self.cache_suffix)]
        return filelist
filebased.py 文件源码 项目:liberator 作者: libscie 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def _list_cache_files(self):
        """
        Get a list of paths to all the cache files. These are all the files
        in the root cache dir that end on the cache_suffix.
        """
        if not os.path.exists(self._dir):
            return []
        filelist = [os.path.join(self._dir, fname) for fname
                    in glob.glob1(self._dir, '*%s' % self.cache_suffix)]
        return filelist
filebased.py 文件源码 项目:gmail_scanner 作者: brandonhub 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def _list_cache_files(self):
        """
        Get a list of paths to all the cache files. These are all the files
        in the root cache dir that end on the cache_suffix.
        """
        if not os.path.exists(self._dir):
            return []
        filelist = [os.path.join(self._dir, fname) for fname
                    in glob.glob1(self._dir, '*%s' % self.cache_suffix)]
        return filelist
filebased.py 文件源码 项目:djanoDoc 作者: JustinChavez 项目源码 文件源码 阅读 39 收藏 0 点赞 0 评论 0
def _list_cache_files(self):
        """
        Get a list of paths to all the cache files. These are all the files
        in the root cache dir that end on the cache_suffix.
        """
        if not os.path.exists(self._dir):
            return []
        filelist = [os.path.join(self._dir, fname) for fname
                    in glob.glob1(self._dir, '*%s' % self.cache_suffix)]
        return filelist
probesc.py 文件源码 项目:probesc 作者: bstaint 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def find_modules(self, src_dir):
        ''' ?????? '''
        for fn in glob.glob1(src_dir, '[!_]*.py'):
            yield os.path.splitext(fn)[0]
filebased.py 文件源码 项目:CSCE482-WordcloudPlus 作者: ggaytan00 项目源码 文件源码 阅读 42 收藏 0 点赞 0 评论 0
def _list_cache_files(self):
        """
        Get a list of paths to all the cache files. These are all the files
        in the root cache dir that end on the cache_suffix.
        """
        if not os.path.exists(self._dir):
            return []
        filelist = [os.path.join(self._dir, fname) for fname
                    in glob.glob1(self._dir, '*%s' % self.cache_suffix)]
        return filelist
filebased.py 文件源码 项目:producthunt 作者: davidgengler 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def _list_cache_files(self):
        """
        Get a list of paths to all the cache files. These are all the files
        in the root cache dir that end on the cache_suffix.
        """
        if not os.path.exists(self._dir):
            return []
        filelist = [os.path.join(self._dir, fname) for fname
                    in glob.glob1(self._dir, '*%s' % self.cache_suffix)]
        return filelist
filebased.py 文件源码 项目:django-rtc 作者: scifiswapnil 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def _list_cache_files(self):
        """
        Get a list of paths to all the cache files. These are all the files
        in the root cache dir that end on the cache_suffix.
        """
        if not os.path.exists(self._dir):
            return []
        filelist = [os.path.join(self._dir, fname) for fname
                    in glob.glob1(self._dir, '*%s' % self.cache_suffix)]
        return filelist
editor_panel.py 文件源码 项目:pw_Houdini_VEX_Editor 作者: paulwinex 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def theme_menu(self):
        actions = self.menuTheme.actions()
        for i in actions[2:]:
            self.menuTheme.removeAction(i)

        path = os.path.join(os.path.dirname(__file__), 'colors').replace('\\','/')
        files = glob.glob1(path, '*.json')
        for f in files:
            full = os.path.join(path, f).replace('\\','/')
            d = json.load(open(full))
            a = QAction(d['name'], self, triggered=lambda f=d['name']:self.set_theme(f))
            self.menuTheme.addAction(a)
editor_panel.py 文件源码 项目:pw_Houdini_VEX_Editor 作者: paulwinex 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def update_backup_menu(self):
        actions = self.backup_menu_act.actions()
        for i in actions[3:]:
            self.backup_menu_act.removeAction(i)

        backupdir = vex_settings.backup_folder()
        for b in glob.glob1(backupdir, '*.backup'):
            act = QAction(b, self)
            # act.setData(os.path.join(backupdir, b).replace('\\','/'))
            path = os.path.join(backupdir, b).replace('\\','/')
            act.triggered.connect(lambda x=path: self.restore_backup(x))
            self.backup_menu_act.addAction(act)
theme_editor.py 文件源码 项目:pw_Houdini_VEX_Editor 作者: paulwinex 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def get_themes(self):
        path = self.themes_path()
        themes = []
        for c in glob.glob1(path, '*.json'):
            try:
                data = json.load(open(os.path.join(path, c)))
            except:
                continue
            data['path'] = os.path.join(path, c).replace('\\','/')
            themes.append(data)
        return themes
filebased.py 文件源码 项目:geekpoint 作者: Lujinghu 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def _list_cache_files(self):
        """
        Get a list of paths to all the cache files. These are all the files
        in the root cache dir that end on the cache_suffix.
        """
        if not os.path.exists(self._dir):
            return []
        filelist = [os.path.join(self._dir, fname) for fname
                    in glob.glob1(self._dir, '*%s' % self.cache_suffix)]
        return filelist
filebased.py 文件源码 项目:django-next-train 作者: bitpixdigital 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def _list_cache_files(self):
        """
        Get a list of paths to all the cache files. These are all the files
        in the root cache dir that end on the cache_suffix.
        """
        if not os.path.exists(self._dir):
            return []
        filelist = [os.path.join(self._dir, fname) for fname
                    in glob.glob1(self._dir, '*%s' % self.cache_suffix)]
        return filelist
filebased.py 文件源码 项目:LatinSounds_AppEnviaMail 作者: G3ek-aR 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def _list_cache_files(self):
        """
        Get a list of paths to all the cache files. These are all the files
        in the root cache dir that end on the cache_suffix.
        """
        if not os.path.exists(self._dir):
            return []
        filelist = [os.path.join(self._dir, fname) for fname
                    in glob.glob1(self._dir, '*%s' % self.cache_suffix)]
        return filelist
filebased.py 文件源码 项目:DjangoZeroToHero 作者: RayParra 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def _list_cache_files(self):
        """
        Get a list of paths to all the cache files. These are all the files
        in the root cache dir that end on the cache_suffix.
        """
        if not os.path.exists(self._dir):
            return []
        filelist = [os.path.join(self._dir, fname) for fname
                    in glob.glob1(self._dir, '*%s' % self.cache_suffix)]
        return filelist
filebased.py 文件源码 项目:Roboism 作者: markroxor 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def _list_cache_files(self):
        """
        Get a list of paths to all the cache files. These are all the files
        in the root cache dir that end on the cache_suffix.
        """
        if not os.path.exists(self._dir):
            return []
        filelist = [os.path.join(self._dir, fname) for fname
                    in glob.glob1(self._dir, '*%s' % self.cache_suffix)]
        return filelist
filebased.py 文件源码 项目:django-wechat-api 作者: crazy-canux 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def _list_cache_files(self):
        """
        Get a list of paths to all the cache files. These are all the files
        in the root cache dir that end on the cache_suffix.
        """
        if not os.path.exists(self._dir):
            return []
        filelist = [os.path.join(self._dir, fname) for fname
                    in glob.glob1(self._dir, '*%s' % self.cache_suffix)]
        return filelist


问题


面经


文章

微信
公众号

扫码关注公众号