43 lines
965 B
Python
43 lines
965 B
Python
# To change this template, choose Tools | Templates
|
|
# and open the template in the editor.
|
|
|
|
__author__="bjschuma"
|
|
__date__ ="$Dec 4, 2009 3:37:21 PM$"
|
|
|
|
# We need to import settings before we can use disp()
|
|
import session
|
|
|
|
# The first thing we do is import write() so we can occasionally print messages
|
|
from bt.message import write
|
|
|
|
# We need this next import to set the process name
|
|
from bt.proc import setname
|
|
from bt.signal import emit
|
|
from bt.file import join
|
|
|
|
# Import the plugin loader class!
|
|
import loader
|
|
|
|
|
|
def loadPluginPath(path):
|
|
loader.load.loaddir(path)
|
|
session.manager.addPlugins(loader.load.getPlugins())
|
|
|
|
|
|
# Begin our main loop
|
|
def main():
|
|
for path in session.settings.get("PLUGPATH"):
|
|
loadPluginPath(path)
|
|
|
|
app = session.settings["appname"]
|
|
write("Welcome to "+app+"!")
|
|
setname(app)
|
|
session.settings["appdir"] = join(session.settings["user"], "."+app)
|
|
|
|
emit("scion-plugins-loaded")
|
|
emit("scion-begin")
|
|
|
|
|
|
|
|
if __name__ == "__main__":main()
|