Mercurial > eagle-eye
comparison pyikriam/lconf.py @ 68:4ba1e981716d
merged kevint and hychen's work.
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Wed, 22 Oct 2008 06:24:39 +0800 |
parents | 19d2a7b175b3 |
children | d4b7d8f51e9f |
comparison
equal
deleted
inserted
replaced
67:6eccb3a95df5 | 68:4ba1e981716d |
---|---|
1 import os,string | |
2 class LoadConfigfile(object): | |
3 def __init__(self): | |
4 profile = os.environ["HOME"]+'/.eagleeye.pm' | |
5 self.cd={} | |
6 if os.path.isfile(profile): | |
7 print "Loading Config file." | |
8 cfile=open(profile,'r') | |
9 for line in cfile.xreadlines(): | |
10 if line[0:3]=='$::': | |
11 con=string.split(line[3:-2]) | |
12 self.cd[con[0]]=con[2][1:-1] | |
13 else: | |
14 print "File don't exist." | |
15 |