annotate pyikb/lconf.py @ 114:900535236e34
user: billy3321@f3svr.f3.csu.edu.tw.f3.csu.edu.tw
changed usebot.sh
author |
billy3321@f3svr.f3.csu.edu.tw.f3.csu.edu.tw |
date |
Thu, 30 Oct 2008 12:08:25 +0800 |
parents |
1c42ae140ad3 |
children |
|
rev |
line source |
63
|
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
|