#!/usr/local/bin/python2.4
import sys
import os

try:
    BASE_DIR="src/"
    sys.path.append(os.path.join(os.getcwd(), BASE_DIR))
    import modules.pympdclient2
    import modules.pympdriver
    print "Using relative directory structure"
except ImportError, e:
    import pympd
    from pympd.modules import pympdclient2
    from pympd.modules import pympdriver
    modules = pympd.modules
    BASE_DIR="%s/share/pympd" % ("/usr/local")

def main():
    pympdclient = modules.pympdclient2.PyMpdController()
    driver = modules.pympdriver.PyMpdGUI(BASE_DIR, pympdclient.do)
    driver.start() #gtk.threads_init gtk.main()

if __name__ == "__main__":
    main()
