45 lines
712 B
Python
45 lines
712 B
Python
#! /usr/bin/python
|
|
|
|
# To change this template, choose Tools | Templates
|
|
# and open the template in the editor.
|
|
|
|
__author__="bjschuma"
|
|
__date__ ="$Feb 16, 2010 11:56:00 PM$"
|
|
|
|
|
|
global scripts
|
|
scripts = []
|
|
|
|
#from bt.message import write
|
|
from bt.signal import *
|
|
from bt import file
|
|
from bt import cmd
|
|
#import manager
|
|
|
|
|
|
def add(script):
|
|
global scripts
|
|
scripts += [script]
|
|
|
|
|
|
def runScript(script):
|
|
f = file.fopen(script)
|
|
for line in f:
|
|
cmd.run(line)
|
|
f.close()
|
|
|
|
|
|
def runScripts():
|
|
#write(scripts)
|
|
for script in scripts:
|
|
runScript(script)
|
|
cmd.run("exit")
|
|
|
|
|
|
def checkForScripts():
|
|
global scripts
|
|
if len(scripts) > 0:
|
|
register("scion-begin",runScripts,50)
|
|
|
|
|
|
register("scion-plugins-loaded",checkForScripts) |