1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| # -*- coding: GBK -*-
| # GMAccounts.txt¶ÔÓ¦µÄÿÐÐÅäÖÃÏîÄÚÈÝ
| # author: ifo
| # Date: 2011.10.26
| # history: 2011.10.26 Created
|
| import AccountInfo
|
| class tagDSAccountParam:
| def __init__(self, params,comment):
| self.comment = comment.replace( "\n", "\t" ).split( "\t" )
| self.params = params
| accountInfo = AccountInfo.tagDSAccount()
| for i in range(len(self.params)-1):
| setattr(self,self.comment[i],type(getattr(accountInfo,self.comment[i]))(self.params[i]))
|
|
| def __str__(self):
| tagDSAccountStr = ""
| for i in range(len(self.params)-1):
| tagDSAccountStr += " %s : %s %s \n"%(self.comment[i],getattr(self,self.comment[i]),type(getattr(self,self.comment[i])))
| return tagDSAccountStr
|
|