Feature #449 » configure_reader.py
| 1 | #!/usr/bin/env python
 | 
|---|---|
| 2 | # -*- coding: utf-8 -*-
 | 
| 3 | # ˅
 | 
| 4 | import configparser | 
| 5 | # ˄
 | 
| 6 |  | 
| 7 |  | 
| 8 | class ConfigureReader(object): | 
| 9 |     # ˅
 | 
| 10 |  | 
| 11 |     # ˄
 | 
| 12 | def __init__(self): | 
| 13 |         # ˅
 | 
| 14 |         pass
 | 
| 15 |         # ˄
 | 
| 16 | self.config = configparser.ConfigParser() | 
| 17 | self.config.read('ConfigFile.ini') | 
| 18 |  | 
| 19 | def getImageWith(self): | 
| 20 |         # ˅
 | 
| 21 |         pass
 | 
| 22 |         # ˄
 | 
| 23 | return self.config['DEFAULT']['ImageWidth'] | 
| 24 |  | 
| 25 | def getimageHeight(self): | 
| 26 |         # ˅
 | 
| 27 |         pass
 | 
| 28 |         # ˄
 | 
| 29 | return self.config['DEFAULT']['ImageHeight'] | 
| 30 |  | 
| 31 | def getProjectorDistance(self): | 
| 32 |         # ˅
 | 
| 33 |         pass
 | 
| 34 |         # ˄
 | 
| 35 | return self.config['DEFAULT']['ProjectorDistance'] | 
| 36 |  | 
| 37 | def getProjectorImageWith(self): | 
| 38 |         # ˅
 | 
| 39 |         pass
 | 
| 40 |         # ˄
 | 
| 41 | return self.config['DEFAULT']['ProjectorImageWidth'] | 
| 42 |  | 
| 43 | def getGamma(self): | 
| 44 |         # ˅
 | 
| 45 |         pass
 | 
| 46 |         # ˄
 | 
| 47 | return self.config['DEFAULT']['ImageGamma'] | 
| 48 |  | 
| 49 |  | 
| 50 | def getImageName(self): | 
| 51 |         # ˅
 | 
| 52 |         pass
 | 
| 53 |         # ˄
 | 
| 54 | return self.config['DEFAULT']['ImageName'] | 
| 55 |  | 
| 56 | def isImageLeft(self): | 
| 57 |         # ˅
 | 
| 58 |         pass
 | 
| 59 |         # ˄
 | 
| 60 | if (self.getImageName == "Left.jpg"): | 
| 61 | return True | 
| 62 | else: | 
| 63 | return False | 
| 64 |  | 
| 65 |  | 
| 66 |     # ˅
 | 
| 67 |  | 
| 68 |     # ˄
 | 
| 69 |  | 
| 70 |  | 
| 71 | # ˅
 | 
| 72 |  | 
| 73 | # ˄
 |