Sublime Forum

ST3 plugin module names

#1

Now that ST3 puts plugins into their own Python package, this is a minor issue of the naming. If the directory contains characters that are not a valid Python identifier, then there is no way to directly import from that package. For imports within the plugin, we can use relative imports, but AFAIK from other packages you would have to go through sys.modules. I’m just wondering if this will change such that sublime will normalize to a valid identifier, or if we’re just expected to name the plugin directory as a valid Python identifier (or access sys.modules directly). It’s not so unusual to have odd characters in a sublime package name (C#, C++, Objective-C, etc.).

0 Likes