import sys, os try: import pygtk pythk.require("2.0") except: pass try: import gtk import gtk.glade except: sys.exit(1) class bambotoo: """Main class loader""" def __init__(self): """initialises the variables, connects database et all """ print "Bambotoo admin: init ======================================" self.gladeFile = "../glade_files/module_manager.glade" self.debug = True ## Modules directory ## TODO: this need to be configuratble with a popup box and save to sile/xml/ini self.modulesDir = "/home/bambotoo/bambotoo/trunk/modules/" #self.modulesDir = "../../bambotoo/trunk/modules/" print self.modulesDir self.walktree(self.modulesDir) ## Load the Glade MainWindow self.wTree = gtk.glade.XML(self.gladeFile,'win-module-manager') def walktree(path, depthfirst = True): """Walk the directory tree, starting from top. Credit to Noah Spurrier and Doug Fort.""" print path os.listdir(path) return None if __name__ == "__main__": bb = bambotoo() gtk.main()