+def findAvailableConnector(tryConnectors, availableConnectors):
+ for connector in tryConnectors:
+ if connector in availableConnectors: return connector
+ return None
+
+# load options
+config = loadConfigFile(os.getenv('HOME') + '/.dsl.conf')
+if len(config['internalConnector']) != 1:
+ raise Exception("You must specify exactly one internal connector")
+if len(config['externalConnectors']) < 1:
+ raise Exception("You must specify at least one external connector")
+# use options
+internalConnector = config['internalConnector'][0]
+externalConnectors = config['externalConnectors']