资源简介
sublime text 3没有package control的情况,下载这个文件,选择菜单:Preference-->Browse Package... 浏览插件,将下载的文件覆盖到该目录下
代码片段和文件信息
import os
import sys
import sublime
import sublime_plugin
if sys.version_info >= (3):
import importlib
import zipimport
st_build = int(sublime.version())
mod_prefix = ‘package_control‘
# ST3 loads each package as a module so it needs an extra prefix
if sys.version_info >= (3):
bare_mod_prefix = mod_prefix
mod_prefix = ‘Package Control.‘ + mod_prefix
from imp import reload
# When reloading the package we also need to reload the base “package_control“
# module in ST3. This flag inidicates we should re-add the PC package path
# to the beginning of sys.path before we try to reload.
do_insert = False
is_zipped = False
commands_name = mod_prefix + ‘.commands‘
if commands_name in sys.modules and sys.version_info >= (3) and st_build < 3112:
# Unfortunately with ST3 the ZipLoader does not “properly“
# implement load_module() instead loading the code from the zip
# file when the object is instantiated. This means that calling
# reload() by itself does nothing. Instead we have to refresh the
# actual source code and then call reload().
pc_package_path = os.path.dirname(__file__)
if pc_package_path.endswith(‘.sublime-package‘):
refreshing_zip_loader = sublime_plugin.ZipLoader(pc_package_path)
pc_zip_loader = sys.modules[commands_name].__loader__
if hasattr(pc_zip_loader ‘contents‘) and hasattr(pc_zip_loader ‘packages‘):
pc_zip_loader.contents = refreshing_zip_loader.contents
pc_zip_loader.packages = refreshing_zip_loader.packages
if pc_package_path in zipimport._zip_directory_cache:
del zipimport._zip_directory_cache[pc_package_path]
is_zipped = True
importlib.invalidate_caches()
do_insert = True
# Python allows reloading modules on the fly which allows us to do live upgrades.
# The only caveat to this is that you have to reload in the dependency order.
#
# Thus is module A depends on B and we don‘t reload B before A when A is reloaded
# it will still have a reference to the old B. Thus we hard-code the dependency
# order of the various Package Control modules so they get reloaded properly.
#
# There are solutions for doing this all programatically but this is much easier
# to understand.
reload_mods = []
for mod in sys.modules:
if mod[0:15] in set([‘package_control‘ ‘Package Control‘]) and sys.modules[mod] is not None:
reload_mods.append(mod)
mods_load_order = [
‘‘
‘.sys_path‘
‘.text‘
‘.cache‘
‘.file_not_found_error‘
‘.open_compat‘
‘.http_cache‘
‘.console_write‘
‘.unicode‘
‘.clear_directory‘
‘.show_error‘
‘.cmd‘
‘.processes‘
‘.settings‘
‘.show_quick_panel‘
‘.thread_progress‘
‘.package_io‘
‘.semver‘
‘.versions‘
‘.deps.asn1crypto._errors‘
‘.deps.asn1crypto._ffi‘
‘.deps.asn1crypto._int‘
‘.deps.asn1crypto._elliptic_curve‘
‘.deps.asn1crypto._types‘
‘.deps.asn1crypto._inet
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
I.A.... 8565 2016-08-04 10:03 Package Control\1_reloader.py
I.A.... 6322 2016-09-12 14:30 Package Control\2_bootstrap.py
I.A.... 2502 2015-09-04 12:37 Package Control\Default.sublime-commands
I.A.... 182 2016-07-29 14:07 Package Control\dependencies.json
I.A.... 1487 2016-03-07 06:46 Package Control\Main.sublime-menu
I.A.... 621 2013-10-24 22:38 Package Control\messages\1.3.0.txt
I.A.... 3695 2014-11-21 23:27 Package Control\messages\1.6.0.txt
I.A.... 2550 2014-11-21 23:27 Package Control\messages\2.0.0.txt
I.A.... 2261 2015-01-14 17:18 Package Control\messages\3.0.0.txt
I.A.... 876 2015-09-14 11:44 Package Control\messages\3.1.0.txt
I.A.... 743 2016-09-19 13:58 Package Control\messages\3.2.0.txt
I.A.... 195 2016-09-19 13:58 Package Control\messages.json
I.A.... 5123 2016-08-04 10:03 Package Control\Package Control.py
I.A.... 7379 2015-03-13 08:47 Package Control\Package Control.sublime-settings
I.A.... 155 2016-09-22 17:11 Package Control\package-me
I.A.... 11289 2016-08-04 10:06 Package Control\package_control\automatic_upgrader.py
I.A.... 6032 2016-08-04 10:09 Package Control\package_control\bootstrap.py
I.A.... 4939 2014-11-21 23:27 Package Control\package_control\cache.py
I.A.... 6516 2016-09-13 11:08 Package Control\package_control\ca_certs.py
I.A.... 4078 2015-03-12 23:54 Package Control\package_control\clear_directory.py
I.A.... 8997 2016-08-04 10:33 Package Control\package_control\clients\bitbucket_client.py
I.A.... 360 2015-03-13 00:20 Package Control\package_control\clients\client_exception.py
I.A.... 10595 2016-08-04 10:33 Package Control\package_control\clients\github_client.py
I.A.... 1832 2016-08-04 10:33 Package Control\package_control\clients\json_api_client.py
I.A.... 2436 2016-08-04 11:45 Package Control\package_control\clients\readme_client.py
I.A.... 0 2013-10-24 22:38 Package Control\package_control\clients\__init__.py
I.A.... 9537 2016-08-04 10:12 Package Control\package_control\cmd.py
I.A.... 1397 2016-08-04 10:36 Package Control\package_control\commands\add_channel_command.py
I.A.... 1547 2016-08-04 10:36 Package Control\package_control\commands\add_repository_command.py
I.A.... 3527 2016-08-04 10:37 Package Control\package_control\commands\advanced_install_package_command.py
............此处省略143个文件信息
- 上一篇:脑电信号处理.rar
- 下一篇:51单片机三路循迹程序
相关资源
- Improving the Transformer Translation Model wi
- 自动驾驶UNITY源代码
- Sublime3护眼主题
- the ISwR package
- Sublime Text3护眼色Monokai主题浅绿色
- iText中文帮助文档
- org.eclipse.jface.text修改版
- 解决Sublime_Text3不能在线“Install Pack
- FreeTextBox.dll 控件
- GoSublime zip
- org.eclipse.jface.text_3.10.0.v20150603-1752
- Timer.unitypackage
- zw_pixiuli-9947751-SLEP_package_4.1.zip
- zw_text.zip
- JCD_Highlighting.unitypackage
- ShuiBoWen.unitypackage
- Sublime3 Fortran语言高亮配置文件
- keras实现基于语义理解的自动文摘实现
- labview获取窗口标题Getwindowtext.vi
- DotweenPro 1.0.244.unitypackage
- 血条.unitypackage
- 对象池pool项目工程.unitypackage
- 三种截屏方式.unitypackage
- ShaderlabVSCode 1.2.1.unitypackage
- 51单片机控制TC35 之发送TEXT短信
- photoscan空三导入ContextCapture
- TEXTQOL 封装
- sublime插件tag
- 仿Sublime Text 3的Keil MDK背景颜色配置
- TexturePacker注册码
评论
共有 条评论