Sublime Forum

Module organisation & importing

#1

I am building a sublime plugin and am trying to organise my code into folders. Each folder has an init.py.

My problem is that as soon as I move any py files out of the root folder they are no longer re-compiled, even though (as far as I can tell) the import statements are correct.
Even if I have all the .py files in the root I have to save each one in turn down the import chain e.g. If A imports B and B imports C, I have to save C then, B and then A even if there are no changes to B or A.

I am doing something dumb!? Im fairly new to python so maybe missing something

0 Likes

Plugin organization / importing
#2

Sublime only reloads the first level. For submodules, you’ll have to manually reload by calling the reload function.

0 Likes

#3

Perfect… thanks :smile:

0 Likes