49 lines
1.1 KiB
Python
49 lines
1.1 KiB
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 settings
|
|
settings.set("appname","scion")
|
|
|
|
# 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
|
|
import manager
|
|
|
|
|
|
def loadPluginPath(path):
|
|
loader.load.loaddir(path)
|
|
manager.manager.addPlugins(loader.load.getPlugins())
|
|
|
|
|
|
# Begin our main loop
|
|
def main():
|
|
for path in settings.get("PLUGPATH"):
|
|
loadPluginPath(path)
|
|
|
|
emit("scion-plugins-loaded")
|
|
|
|
app = settings.get("appname")
|
|
write("Welcome to "+app+"!")
|
|
setname(app)
|
|
settings.set("appdir", join(settings.get("user"), "."+app) )
|
|
|
|
manager.manager.restoresession()
|
|
manager.manager.startup()
|
|
emit("scion-begin")
|
|
#settings.get("loop")()
|
|
|
|
|
|
|
|
if __name__ == "__main__":main()
|