How can i get values from a init - file

martin z u9825527 at minteka.dbai.tuwien.ac.at
Thu Nov 29 04:52:03 EST 2001


I want to make a init - file, where i can set value for variables in
my programm. 
now i have in my programm a class : 

class TEST:
  def __init__(self):
     self.a = 12
     self.b = 13
     self.c = 14
     self.d = 15


I want to make a init- file like (or a other style. It is free; But i
do not want write self.a = 12   because. other peoble should also use)
: 
a  12
b 13 
c 14
d 15 

I need a init file to save the settings of my programm. 
How can i read the values of the init file into my programm without
asking all cases. ? e.g: 
If s ==  a then 
  self.a = s1


I hope you understand my problem. 

martin



More information about the Python-list mailing list