/[cvs]/nfo/projects/netfraggle/bin/fraggleCtlPreferences.py
ViewVC logotype

Annotation of /nfo/projects/netfraggle/bin/fraggleCtlPreferences.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations)
Wed Aug 25 21:43:53 2004 UTC (19 years, 10 months ago) by xabbu
Branch: MAIN
Changes since 1.3: +8 -1 lines
File MIME type: text/x-python
settings are saved to the home dir of the user

1 joko 1.3 import os
2    
3 xabbu 1.1 import fraggleParserXML
4 joko 1.3 from fraggleEngine import *
5 xabbu 1.1
6 xabbu 1.2 def create(parent):
7     return fraggleCtlPreferences(parent)
8    
9 xabbu 1.1 class fraggleCtlPreferences:
10    
11 xabbu 1.2 def __init_fraggle_xml__(self):
12     self.fraggleXML = fraggleParserXML.create(self)
13 xabbu 1.1
14    
15 xabbu 1.4
16    
17 xabbu 1.1 def __init__(self,parent):
18     self.__init_fraggle_xml__()
19    
20    
21     #def savePrefs():
22    
23    
24 xabbu 1.2 def setConfig(self,username,password,url,retrieval):
25     self.configList = {'username': username,'password': password,'url': url,'retrieval': retrieval}
26    
27     def getConfig(self):
28     return self.configList
29    
30 xabbu 1.4
31     def loadConfig(self,inputLocation):
32     self.configList = self.fraggleXML.unmarshalXML(inputLocation)
33    
34    
35 xabbu 1.2 def saveConfig(self):
36 joko 1.3 engine = FraggleEngine()
37     prefsfile = os.path.join(engine.getDefaultDir(), 'prefs.xml')
38     self.fraggleXML.marshalXML(self.configList, prefsfile)
39    
40 xabbu 1.4

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed