From 877077f277198ac7e29295ebb22233bf4b5754cb Mon Sep 17 00:00:00 2001 From: Dominic Marc Bodenmann Date: Mon, 29 Apr 2013 19:18:53 -0400 Subject: [PATCH] Added Posix variable expanding, so ENV's liek $HOME or $TODO_DIR can be used in todo.cfg --- Punch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Punch.py b/Punch.py index ef11a5c..057b7bb 100755 --- a/Punch.py +++ b/Punch.py @@ -124,7 +124,7 @@ def parse_config(self): punctuation = [ propDef.find(c) for c in '= ' ] + [ len(propDef) ] found = min( [ pos for pos in punctuation if pos != -1 ] ) name= propDef[:found].rstrip() - value= propDef[found:].lstrip(":= ").rstrip() + value= os.path.expandvars( propDef[found:].lstrip(":= ").rstrip() ) self.propDict[name]= value.strip('"') configFile.close()