comparison ide/project.py @ 8:edd70006d3e4

Started with MDI functions
author windel
date Fri, 21 Oct 2011 17:36:57 +0200
parents 2db4d2b362e6
children de004f808e56
comparison
equal deleted inserted replaced
7:2db4d2b362e6 8:edd70006d3e4
24 class Project: 24 class Project:
25 def __init__(self): 25 def __init__(self):
26 self.name = "" 26 self.name = ""
27 self.files = [] 27 self.files = []
28 self.settings = {} 28 self.settings = {}
29 self.filename = ""
29 30
30 def save(self, filename): 31 def save(self, filename):
31 """ Save the project in XML format """ 32 """ Save the project in XML format """
32 # Create document: 33 # Create document:
33 doc = md.Document() 34 doc = md.Document()
51 52
52 def load(self, filename): 53 def load(self, filename):
53 """ Load the project from the XML file """ 54 """ Load the project from the XML file """
54 if not os.path.exists(filename): 55 if not os.path.exists(filename):
55 return 56 return
57 self.filename = filename
58 print(self.filename)
56 parser = make_parser() 59 parser = make_parser()
57 handler = ProjectContentHandler(self) 60 handler = ProjectContentHandler(self)
58 parser.setContentHandler(handler) 61 parser.setContentHandler(handler)
59 parser.parse(filename) 62 parser.parse(filename)
60 63