Sublime Forum

Override to exec.py not working

#1

Hi all,

Apologies if this is “Plugin Development”–I’m not sure what to pick between TS vs PD.

I’m trying to figure out why my exec.py override is not working.

In the past (Sublime 3), my group had applied an override in the def finish function, to suppress the self.debug_text output. This override was placed under .../Packages/MyDefaults/ directory, not in .../User/ and it worked without issues.

Ever since I recently moved to Sublime 4 however, the exec.py in this MyDefaults directory doesn’t appear to be applied properly (the exec.py from Sublime 4 is used)? It works fine if I move the exec.py to User/ but is there a way to make it work inside MyDefaults/?

Not sure if below is any useful info but whenever placed in MyDefaults/ vs User/, the console shows below:

# when placed in MyDefaults/
reloading python 3.3 plugin MyDefaults.exec

# when placed in User/
reloading python plugin User.exec

Inside the .../Lib/ directory, I only see python33/ and python38.

Much appreciated for any help!

0 Likes

#2

Plugins in Default and User run on python 3.8 plugin_host.

Plugins, which want to load modules from those, need to run on same plugin_host.

to opt-in to it, create a .python-versions file with 3.8 in root of such package.

0 Likes

#3

Thanks so much!

Your response was spot on and fixes it. I also found the API Environments page in Sublime thanks to you and was able to get a better grasp of the problem :slight_smile:

0 Likes