當前位置: 首頁>>代碼示例>>Python>>正文


Python _path_created.clear方法代碼示例

本文整理匯總了Python中distutils.dir_util._path_created.clear方法的典型用法代碼示例。如果您正苦於以下問題:Python _path_created.clear方法的具體用法?Python _path_created.clear怎麽用?Python _path_created.clear使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在distutils.dir_util._path_created的用法示例。


在下文中一共展示了_path_created.clear方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: install_hiyacfw

# 需要導入模塊: from distutils.dir_util import _path_created [as 別名]
# 或者: from distutils.dir_util._path_created import clear [as 別名]
def install_hiyacfw(self, launcher_app, launcher_folder):
        self.log.write('\nCopying HiyaCFW files...')

        # Reset copied files cache
        _path_created.clear()

        copy_tree('for SDNAND SD card', self.sd_path, update=1)
        copyfile('bootloader.nds', path.join(self.sd_path, 'hiya', 'bootloader.nds'))
        copyfile(launcher_app, path.join(launcher_folder, launcher_app))

        if launcher_app == '00000000.app':
            copyfile('title.tmd', path.join(launcher_folder, 'title.tmd'))

        Thread(target=self.get_latest_twilight if self.twilight.get() == 1 else self.clean).start()


    ################################################################################################ 
開發者ID:mondul,項目名稱:HiyaCFW-Helper,代碼行數:19,代碼來源:HiyaCFW_Helper.py

示例2: restore_os_environ

# 需要導入模塊: from distutils.dir_util import _path_created [as 別名]
# 或者: from distutils.dir_util._path_created import clear [as 別名]
def restore_os_environ(self, saved_environ):
        os.environ = saved_environ[1]
        os.environ.clear()
        os.environ.update(saved_environ[2]) 
開發者ID:war-and-code,項目名稱:jawfish,代碼行數:6,代碼來源:regrtest.py

示例3: restore_shutil_archive_formats

# 需要導入模塊: from distutils.dir_util import _path_created [as 別名]
# 或者: from distutils.dir_util._path_created import clear [as 別名]
def restore_shutil_archive_formats(self, saved):
        shutil._ARCHIVE_FORMATS = saved[0]
        shutil._ARCHIVE_FORMATS.clear()
        shutil._ARCHIVE_FORMATS.update(saved[1]) 
開發者ID:war-and-code,項目名稱:jawfish,代碼行數:6,代碼來源:regrtest.py

示例4: restore_shutil_unpack_formats

# 需要導入模塊: from distutils.dir_util import _path_created [as 別名]
# 或者: from distutils.dir_util._path_created import clear [as 別名]
def restore_shutil_unpack_formats(self, saved):
        shutil._UNPACK_FORMATS = saved[0]
        shutil._UNPACK_FORMATS.clear()
        shutil._UNPACK_FORMATS.update(saved[1]) 
開發者ID:war-and-code,項目名稱:jawfish,代碼行數:6,代碼來源:regrtest.py

示例5: restore_threading__dangling

# 需要導入模塊: from distutils.dir_util import _path_created [as 別名]
# 或者: from distutils.dir_util._path_created import clear [as 別名]
def restore_threading__dangling(self, saved):
        if not threading:
            return
        threading._dangling.clear()
        threading._dangling.update(saved)

    # Same for Process objects 
開發者ID:war-and-code,項目名稱:jawfish,代碼行數:9,代碼來源:regrtest.py

示例6: restore_multiprocessing_process__dangling

# 需要導入模塊: from distutils.dir_util import _path_created [as 別名]
# 或者: from distutils.dir_util._path_created import clear [as 別名]
def restore_multiprocessing_process__dangling(self, saved):
        if not multiprocessing:
            return
        multiprocessing.process._dangling.clear()
        multiprocessing.process._dangling.update(saved) 
開發者ID:war-and-code,項目名稱:jawfish,代碼行數:7,代碼來源:regrtest.py

示例7: restore_sysconfig__INSTALL_SCHEMES

# 需要導入模塊: from distutils.dir_util import _path_created [as 別名]
# 或者: from distutils.dir_util._path_created import clear [as 別名]
def restore_sysconfig__INSTALL_SCHEMES(self, saved):
        sysconfig._INSTALL_SCHEMES = saved[1]
        sysconfig._INSTALL_SCHEMES.clear()
        sysconfig._INSTALL_SCHEMES.update(saved[2]) 
開發者ID:war-and-code,項目名稱:jawfish,代碼行數:6,代碼來源:regrtest.py

示例8: _clear_distutils_mkpath_cache

# 需要導入模塊: from distutils.dir_util import _path_created [as 別名]
# 或者: from distutils.dir_util._path_created import clear [as 別名]
def _clear_distutils_mkpath_cache(self):
        """clear distutils mkpath cache
        
        prevents distutils from skipping re-creation of dirs that have been removed
        """
        try:
            from distutils.dir_util import _path_created
        except ImportError:
            pass
        else:
            _path_created.clear() 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:13,代碼來源:cythonmagic.py

示例9: dash_R_cleanup

# 需要導入模塊: from distutils.dir_util import _path_created [as 別名]
# 或者: from distutils.dir_util._path_created import clear [as 別名]
def dash_R_cleanup(fs, ps, pic):
    import gc, copy_reg
    import _strptime, linecache, dircache
    import urlparse, urllib, urllib2, mimetypes, doctest
    import struct, filecmp
    from distutils.dir_util import _path_created

    # Restore some original values.
    warnings.filters[:] = fs
    copy_reg.dispatch_table.clear()
    copy_reg.dispatch_table.update(ps)
    sys.path_importer_cache.clear()
    sys.path_importer_cache.update(pic)

    # Clear assorted module caches.
    _path_created.clear()
    re.purge()
    _strptime._regex_cache.clear()
    urlparse.clear_cache()
    urllib.urlcleanup()
    urllib2.install_opener(None)
    dircache.reset()
    linecache.clearcache()
    mimetypes._default_mime_types()
    struct._cache.clear()
    filecmp._cache.clear()
    doctest.master = None

    # Collect cyclic trash.
    gc.collect() 
開發者ID:ofermend,項目名稱:medicare-demo,代碼行數:32,代碼來源:regrtest.py

示例10: dash_R_cleanup

# 需要導入模塊: from distutils.dir_util import _path_created [as 別名]
# 或者: from distutils.dir_util._path_created import clear [as 別名]
def dash_R_cleanup(fs, ps, pic, zdc, abcs):
    import gc, copy_reg
    import _strptime, linecache
    dircache = test_support.import_module('dircache', deprecated=True)
    import urlparse, urllib, urllib2, mimetypes, doctest
    import struct, filecmp
    from distutils.dir_util import _path_created

    # Clear the warnings registry, so they can be displayed again
    for mod in sys.modules.values():
        if hasattr(mod, '__warningregistry__'):
            del mod.__warningregistry__

    # Restore some original values.
    warnings.filters[:] = fs
    copy_reg.dispatch_table.clear()
    copy_reg.dispatch_table.update(ps)
    sys.path_importer_cache.clear()
    sys.path_importer_cache.update(pic)
    try:
        import zipimport
    except ImportError:
        pass # Run unmodified on platforms without zipimport support
    else:
        zipimport._zip_directory_cache.clear()
        zipimport._zip_directory_cache.update(zdc)

    # clear type cache
    sys._clear_type_cache()

    # Clear ABC registries, restoring previously saved ABC registries.
    for abc, registry in abcs.items():
        abc._abc_registry = registry.copy()
        abc._abc_cache.clear()
        abc._abc_negative_cache.clear()

    # Clear assorted module caches.
    _path_created.clear()
    re.purge()
    _strptime._regex_cache.clear()
    urlparse.clear_cache()
    urllib.urlcleanup()
    urllib2.install_opener(None)
    dircache.reset()
    linecache.clearcache()
    mimetypes._default_mime_types()
    filecmp._cache.clear()
    struct._clearcache()
    doctest.master = None
    try:
        import ctypes
    except ImportError:
        # Don't worry about resetting the cache if ctypes is not supported
        pass
    else:
        ctypes._reset_cache()

    # Collect cyclic trash.
    gc.collect() 
開發者ID:dxwu,項目名稱:BinderFilter,代碼行數:61,代碼來源:regrtest.py

示例11: dash_R_cleanup

# 需要導入模塊: from distutils.dir_util import _path_created [as 別名]
# 或者: from distutils.dir_util._path_created import clear [as 別名]
def dash_R_cleanup(fs, ps, pic, abcs):
    import gc, copy_reg
    import _strptime, linecache
    dircache = test_support.import_module('dircache', deprecated=True)
    import urlparse, urllib, urllib2, mimetypes, doctest
    import struct, filecmp
    from distutils.dir_util import _path_created

    # Clear the warnings registry, so they can be displayed again
    for mod in sys.modules.values():
        if hasattr(mod, '__warningregistry__'):
            del mod.__warningregistry__

    # Restore some original values.
    warnings.filters[:] = fs
    copy_reg.dispatch_table.clear()
    copy_reg.dispatch_table.update(ps)
    sys.path_importer_cache.clear()
    sys.path_importer_cache.update(pic)

    # clear type cache
    sys._clear_type_cache()

    # Clear ABC registries, restoring previously saved ABC registries.
    for abc, registry in abcs.items():
        abc._abc_registry = registry.copy()
        abc._abc_cache.clear()
        abc._abc_negative_cache.clear()

    # Clear assorted module caches.
    _path_created.clear()
    re.purge()
    _strptime._regex_cache.clear()
    urlparse.clear_cache()
    urllib.urlcleanup()
    urllib2.install_opener(None)
    dircache.reset()
    linecache.clearcache()
    mimetypes._default_mime_types()
    filecmp._cache.clear()
    struct._clearcache()
    doctest.master = None

    # Collect cyclic trash.
    gc.collect() 
開發者ID:Acmesec,項目名稱:CTFCrackTools-V2,代碼行數:47,代碼來源:regrtest.py


注:本文中的distutils.dir_util._path_created.clear方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。