45 lines
964 B
Python
45 lines
964 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$"
|
|
|
|
global name
|
|
name = "ocarina2"
|
|
|
|
# We need to import settings before we can use disp()
|
|
import settings
|
|
|
|
# The first thing we do is import write() so we can occasionally print messages
|
|
from bt.message import write
|
|
write("Welcome to Ocarina2")
|
|
|
|
# Next, we set the process name to ocarina2
|
|
from bt.proc import setname
|
|
setname(name)
|
|
|
|
# Import the plugin loader class!
|
|
import loader
|
|
import manager
|
|
|
|
|
|
def loadPluginPath(path):
|
|
# Load a plugin directory, add give to the plugin manager
|
|
load = loader.PluginLoader()
|
|
load.loaddir("../core")
|
|
manager.manager.addPlugins(load.plugins)
|
|
|
|
|
|
# Begin our main loop
|
|
def main():
|
|
load = loader.PluginLoader()
|
|
for path in settings.get("PLUGPATH"):
|
|
loadPluginPath(path)
|
|
|
|
raw_input("Input something:")
|
|
manager.manager.reloadPlugin("example")
|
|
|
|
|
|
|
|
if __name__ == "__main__":main()
|