Sublime Forum

Distinguishing python files to load from libraries and utils

#1

I’m writing a python script to build a .sublime-package from a package folder. That script lives in the package folder, eg;

PackageDownloader
PackageDownloaderPlugin.py – the plugin; has an include for PackageDownloader.py
PackageDownloader.py – a library file, does not contain sublime commands
Package.py – a utility to zip up the relevant files

Is there some way that I can mark a file as not being something for Sublime to load? Either a note to Sublime to say ‘don’t load me’, or a statement along the lines of if name == main, or some other trick? At the moment, every time I load sublime or edit my utility, Sublime tries to execute it.

Cheers.

0 Likes

#2

It does simply attempt to load all python modules, and then inspect the classes within them… It sounds like if name == main is what you want here, does that not work?

0 Likes

#3

uh, yeah, it does work :wink:

0 Likes