1 |
import os |
2 |
|
3 |
import fraggleParserXML |
4 |
from fraggleEngine import * |
5 |
|
6 |
def create(parent): |
7 |
return fraggleCtlPreferences(parent) |
8 |
|
9 |
class fraggleCtlPreferences: |
10 |
|
11 |
def __init_fraggle_xml__(self): |
12 |
self.fraggleXML = fraggleParserXML.create(self) |
13 |
|
14 |
|
15 |
def __init__(self,parent): |
16 |
self.__init_fraggle_xml__() |
17 |
|
18 |
|
19 |
#def savePrefs(): |
20 |
|
21 |
|
22 |
def setConfig(self,username,password,url,retrieval): |
23 |
self.configList = {'username': username,'password': password,'url': url,'retrieval': retrieval} |
24 |
|
25 |
def getConfig(self): |
26 |
return self.configList |
27 |
|
28 |
def saveConfig(self): |
29 |
#self.fraggleXML.marshalXML(self.configList,"/home/xabbu/test.xml") |
30 |
engine = FraggleEngine() |
31 |
prefsfile = os.path.join(engine.getDefaultDir(), 'prefs.xml') |
32 |
self.fraggleXML.marshalXML(self.configList, prefsfile) |
33 |
|