archlm检验python,Pythonsublime.arch⽅法代码⽰例# 需要导⼊模块: import sublime [as 别名]
# 或者: from sublime import arch [as 别名]
def run(self):
info = {}
info['platform'] = sublime.platform()
info['version'] = sublime.version()
info['arch'] = sublime.arch()
info['boxy_version'] = __version__
info['pc_install'] = is_installed_by_package_control()
try:
import mdpopups
info['mdpopups_version'] = format_version(mdpopups, 'version',
call=True)
except Exception:
info['mdpopups_version'] = 'Version could not be acquired!'
try:
import markdown
info['markdown_version'] = format_version(markdown, 'version')
except Exception:
info['markdown_version'] = 'Version could not be acquired!'
python新手代码示例try:
import jinja2
info['jinja_version'] = format_version(jinja2, '__version__')
except Exception:
info['jinja_version'] = 'Version could not be acquired!'
try:
import pygments
info['pygments_version'] = format_version(pygments, '__version__')
except Exception:
info['pygments_version'] = 'Version could not be acquired!'
msg = textwrap.dedent(
'''\
- Boxy Theme: %(boxy_version)s
-
Sublime Text: %(version)s
- Platform: %(platform)s
- Package Control: %(pc_install)s
- Dependencies:
* mdpopups: %(mdpopups_version)s
* markdown: %(markdown_version)s
* pygments: %(pygments_version)s
* jinja2: %(jinja_version)s
''' % info
)
view = sublime.active_window().active_view() def copy_and_hide(msg):
sublime.set_clipboard(msg)
view.hide_popup()
view.show_place('\n', '
') +
'',
on_navigate=copy_and_hide)
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论