资源简介
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单片机三路循迹程序
相关资源
- 仿windows记事本
- OpenGL导入贴图的Texture类
- SublimeREPL-master.zip
- Behavior Designer 1.6.3(u2018.3.0).unitypa
- 超大文本打开工具Large Text File Viewer
- Influence of shear banding on the formation of
- Experiment investigation of deep-drawing sheet
- Graph And Chart 1.91.unitypackage
- UniWebView 3.unitypackage
- 2020-UEFI docs packages-all.7z
- PBDOM 遍历一个节点下的所有节点name及
- subline text3破解版
- NuGetPackageExplorer DLL管理工具
- 完整的利用itext5、zxing、QRCore制作pd
- 实现yarnlock与packagelockjson相互转换
- [资源插件]Unity3D_UGUI HUD Text v1.4.1.zip
- ShaderlabVSCode 1.1.6.unitypackage
- Anti_TexturePacker v1.6
- iTextSharp创建中文PDF
- iTextSharp验证PDF中签名数量及签名有效
- lt;mathgt; mrow msub mrow mtext AdS / mtext /
- Terrain Assets.unitypackageUnity3d官方资源包
- Lidar.unitypackage
- AR + GPS Location.unitypackage
- mac专用textwrangler文本编辑器
- 安卓EditText输入框相关-自定义固定头
- ServletContextListener完成在线人数统计和
- RichTextBox添加工具条和textBox
- myexporter.unitypackage
- Unity3D的国际象棋源码Chess Game.unitypa
评论
共有 条评论