开发者

Where is sublime.py?

开发者 https://www.devze.com 2023-04-10 04:49 出处:网络
Sublime Text2 text editor is extended via python scripts, using these modules: import sublime, sublime_plugin

Sublime Text2 text editor is extended via python scripts, using these modules:

import sublime, sublime_plugin

I've searched my computer and found sub开发者_C百科lime_plugin.py file. But where is sublime.py?


I believe that Sublime is provided dynamically when you call the plugin via the console.

Remember that an import doesn't have to be a physical .py file, it can be a library or an in-memory representation.

I found a decent reference to the confusions often related to Import, it's a little old now but I believe it's still relevant:

http://effbot.org/zone/import-confusion.htm

Edit: Just to confirm that, I've checked and the Python2.6 runtime is embedded inside the executable for Sublime, and the Sublime module is defined inside there.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号