Sublime Forum

Reloading external modules - st3

#1

if I using custom modules in my plugins with something like the follow:

from helper.configuration_files import generate

I find that once I change the module it doesn’t refresh or reload the module until I reload sublimetext.

Is it possible to get it to reload everything automatically?

0 Likes

Hot update without restarting sublime
#2

You have to write some python to get the (sub)modules to reload properly. I do this with Package Control (python3 branch):

github.com/wbond/sublime_packag … Control.py
github.com/wbond/sublime_packag … eloader.py

0 Likes

#3

Thanks, that got me on the right track!

0 Likes

#4

[quote=“wbond”]You have to write some python to get the (sub)modules to reload properly. I do this with Package Control (python3 branch):

github.com/wbond/sublime_packag … Control.py
github.com/wbond/sublime_packag … eloader.py[/quote]

I change any file in Package Control/package_control but sublime not reloading this file. Why?

0 Likes

#5

Sublime Text only automatically reloads .py files in the root of a package. Thus if you save Package Control.py, it will reload all of the other files inside of the package_control/ folder.

0 Likes