@@ -0,0 +1,1077 @@
+from os import path %0Aimport os%0Aimport shutil, sys%0Aimport ConfigParser%0A%0AVERSION     = '1.0.0'                #software version%0AAPP_PATH    = path.join(path.dirname(__file__),%22../%22)%0AUSER_PATH   = path.join(os.getenv(%22HOME%22) , %22.tmuxback%22)%0ABACKUP_PATH = path.join(USER_PATH, %22backup%22)%0ACONF_FILE   = path.join(USER_PATH, %22tmuxback.conf%22)%0A%0Adef update_config(section, key, value):%0A    %22%22%22 update the given config option%22%22%22%0A    cf = ConfigParser.ConfigParser()%0A    with open( CONF_FILE, 'r') as cfgf:%0A        cf.readfp(cfgf)%0A    cf.set(section, key, value)%0A    with open(CONF_FILE, 'w') as cfgf:%0A        cf.write(cfgf)%0A%0Adef init_needed():%0A    %22%22%22%0A    check if the home config directory exists%0A    %22%22%22%0A    return not path.exists(USER_PATH)%0A%0Adef loadConfig():%0A    %22%22%22%0A        load config from config file %0A        return True if sucessful, otherwise False%0A    %22%22%22%0A    cf = ConfigParser.ConfigParser()%0A    %0A    # if conf file doesn't exist, return False%0A    if not path.exists(CONF_FILE):%0A        return False%0A%0A    cf.read(CONF_FILE);%0A%0A    #load options here%0A    #TODO%0A    return True;%0A%0A

add config.py