本文整理汇总了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()
################################################################################################
示例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])
示例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])
示例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])
示例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
示例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)
示例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])
示例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()
示例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()
示例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()
示例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()