Mercurial > eagle-eye
diff pyikb/lconf.py @ 63:1c42ae140ad3
add Parser.py and lconf.py.
author | kevin@localhost.localdomain |
---|---|
date | Wed, 22 Oct 2008 05:40:57 +0800 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pyikb/lconf.py Wed Oct 22 05:40:57 2008 +0800 @@ -0,0 +1,15 @@ +import os,string +class LoadConfigfile(object): + def __init__(self): + profile = os.environ["HOME"]+'/.eagleeye.pm' + self.cd={} + if os.path.isfile(profile): + print "Loading Config file." + cfile=open(profile,'r') + for line in cfile.xreadlines(): + if line[0:3]=='$::': + con=string.split(line[3:-2]) + self.cd[con[0]]=con[2][1:-1] + else: + print "File don't exist." +