Home Download Buy Blog Forum Support

reloading external modules - st3

reloading external modules - st3

Postby FragOnly on Wed Feb 20, 2013 1:00 am

if I using custom modules in my plugins with something like the follow:
Code: Select all
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?
FragOnly
 
Posts: 19
Joined: Sat Feb 09, 2013 12:50 pm

Re: reloading external modules - st3

Postby wbond on Wed Feb 20, 2013 1:35 pm

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

https://github.com/wbond/sublime_packag ... Control.py
https://github.com/wbond/sublime_packag ... eloader.py
wbond
 
Posts: 523
Joined: Mon Feb 28, 2011 5:33 am

Re: reloading external modules - st3

Postby FragOnly on Wed Feb 20, 2013 2:09 pm

Thanks, that got me on the right track!
FragOnly
 
Posts: 19
Joined: Sat Feb 09, 2013 12:50 pm

Re: reloading external modules - st3

Postby LONGMAN on Wed Mar 06, 2013 10:12 am

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

https://github.com/wbond/sublime_packag ... Control.py
https://github.com/wbond/sublime_packag ... eloader.py

I change any file in Package Control/package_control but sublime not reloading this file. Why?
AutoBackups: ST2 / ST3
CodeFormatter: ST2 / ST3
StringUtilities: ST2 / ST3
LONGMAN
 
Posts: 68
Joined: Mon Nov 26, 2012 5:03 pm
Location: Tbilisi, Georgia

Re: reloading external modules - st3

Postby wbond on Thu Mar 07, 2013 3:19 pm

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.
wbond
 
Posts: 523
Joined: Mon Feb 28, 2011 5:33 am


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 8 guests