@@ -1,349 +1,349 | |||||
1 | ''' |
|
1 | ''' | |
2 | Created on September , 2012 |
|
2 | Created on September , 2012 | |
3 | @author: |
|
3 | @author: | |
4 | ''' |
|
4 | ''' | |
5 | from xml.etree.ElementTree import Element, SubElement, ElementTree |
|
5 | from xml.etree.ElementTree import Element, SubElement, ElementTree | |
6 | from xml.etree import ElementTree as ET |
|
6 | from xml.etree import ElementTree as ET | |
7 | from xml.dom import minidom |
|
7 | from xml.dom import minidom | |
8 |
|
8 | |||
9 | import sys |
|
9 | import sys | |
10 |
|
10 | |||
11 | def prettify(elem): |
|
11 | def prettify(elem): | |
12 | """Return a pretty-printed XML string for the Element. |
|
12 | """Return a pretty-printed XML string for the Element. | |
13 | """ |
|
13 | """ | |
14 | rough_string = ET.tostring(elem, 'utf-8') |
|
14 | rough_string = ET.tostring(elem, 'utf-8') | |
15 | reparsed = minidom.parseString(rough_string) |
|
15 | reparsed = minidom.parseString(rough_string) | |
16 | return reparsed.toprettyxml(indent=" ") |
|
16 | return reparsed.toprettyxml(indent=" ") | |
17 |
|
17 | |||
18 | #def save(a, b): |
|
18 | #def save(a, b): | |
19 | # |
|
19 | # | |
20 | # nameP = "Alexnder" |
|
20 | # nameP = "Alexnder" | |
21 | # descripcion = self.projectWindow.Text() |
|
21 | # descripcion = self.projectWindow.Text() | |
22 | # id = 1 |
|
22 | # id = 1 | |
23 | # x = self.data.projectWindow.cmbbox.value() |
|
23 | # x = self.data.projectWindow.cmbbox.value() | |
24 | # |
|
24 | # | |
25 | # projectObj = Controller(id, name, description) |
|
25 | # projectObj = Controller(id, name, description) | |
26 | # |
|
26 | # | |
27 | # projectObj.setup(id, name, description) |
|
27 | # projectObj.setup(id, name, description) | |
28 |
|
28 | |||
29 | class Controller(): |
|
29 | class Controller(): | |
30 |
|
30 | |||
31 | id = None |
|
31 | id = None | |
32 | name = None |
|
32 | name = None | |
33 | description = None |
|
33 | description = None | |
34 | readBranchObjList = None |
|
34 | readBranchObjList = None | |
35 | procBranchObjList = None |
|
35 | procBranchObjList = None | |
36 |
|
36 | |||
37 | def __init__(self): |
|
37 | def __init__(self): | |
38 |
|
38 | |||
39 | # self.id = id |
|
39 | # self.id = id | |
40 | # self.name = name |
|
40 | # self.name = name | |
41 | # self.description = description |
|
41 | # self.description = description | |
42 |
|
42 | |||
43 | self.readBranchObjList = [] |
|
43 | self.readBranchObjList = [] | |
44 | self.procBranchObjList = [] |
|
44 | self.procBranchObjList = [] | |
45 |
|
45 | |||
46 | def setParms(self, id, name, description): |
|
46 | def setParms(self, id, name, description): | |
47 |
|
47 | |||
48 | self.id = id |
|
48 | self.id = id | |
49 | self.name = name |
|
49 | self.name = name | |
50 | self.description = description |
|
50 | self.description = description | |
51 |
|
51 | |||
52 | def addReadBranch(self, dpath, dataformat, readMode, startDate='', endDate='', startTime='', endTime=''): |
|
52 | def addReadBranch(self, dpath, dataformat, readMode, startDate='', endDate='', startTime='', endTime=''): | |
53 |
|
53 | |||
54 | id = len(self.readBranchObjList) + 1 |
|
54 | id = len(self.readBranchObjList) + 1 | |
55 |
|
55 | |||
56 | readBranchObj = ReadBranch(id, dpath, dataformat, readMode, startDate, endDate, startTime, endTime) |
|
56 | readBranchObj = ReadBranch(id, dpath, dataformat, readMode, startDate, endDate, startTime, endTime) | |
57 |
|
57 | |||
58 | self.readBranchObjList.append(readBranchObj) |
|
58 | self.readBranchObjList.append(readBranchObj) | |
59 |
|
59 | |||
60 | return readBranchObj |
|
60 | return readBranchObj | |
61 |
|
61 | |||
62 | def addProcBranch(self, name): |
|
62 | def addProcBranch(self, name): | |
63 |
|
63 | |||
64 | id = len(self.procBranchObjList) + 1 |
|
64 | id = len(self.procBranchObjList) + 1 | |
65 |
|
65 | |||
66 | procBranchObj = ProcBranch(id, name) |
|
66 | procBranchObj = ProcBranch(id, name) | |
67 |
|
67 | |||
68 | self.procBranchObjList.append(procBranchObj) |
|
68 | self.procBranchObjList.append(procBranchObj) | |
69 |
|
69 | |||
70 | return procBranchObj |
|
70 | return procBranchObj | |
71 |
|
71 | |||
72 | def makeXml(self): |
|
72 | def makeXml(self): | |
73 |
|
73 | |||
74 | projectElement = Element('Controller') |
|
74 | projectElement = Element('Controller') | |
75 | projectElement.set('id', str(self.id)) |
|
75 | projectElement.set('id', str(self.id)) | |
76 | projectElement.set('name', self.name) |
|
76 | projectElement.set('name', self.name) | |
77 | #projectElement.set('description', self.description) |
|
77 | #projectElement.set('description', self.description) | |
78 |
|
78 | |||
79 | se = SubElement(projectElement, 'description',description=self.description)#ESTO ES LO ULTIMO QUE SE TRABAJO |
|
79 | se = SubElement(projectElement, 'description',description=self.description)#ESTO ES LO ULTIMO QUE SE TRABAJO | |
80 | #se.text = self.description #ULTIMA MODIFICACION PARA SACAR UN SUB ELEMENT |
|
80 | #se.text = self.description #ULTIMA MODIFICACION PARA SACAR UN SUB ELEMENT | |
81 |
|
81 | |||
82 | for readBranchObj in self.readBranchObjList: |
|
82 | for readBranchObj in self.readBranchObjList: | |
83 | readBranchObj.makeXml(projectElement) |
|
83 | readBranchObj.makeXml(projectElement) | |
84 |
|
84 | |||
85 | for procBranchObj in self.procBranchObjList: |
|
85 | for procBranchObj in self.procBranchObjList: | |
86 | procBranchObj.makeXml(projectElement) |
|
86 | procBranchObj.makeXml(projectElement) | |
87 |
|
87 | |||
88 | self.projectElement = projectElement |
|
88 | self.projectElement = projectElement | |
89 |
|
89 | |||
90 | def writeXml(self, filename): |
|
90 | def writeXml(self, filename): | |
91 |
|
91 | |||
92 | self.makeXml() |
|
92 | self.makeXml() | |
93 | ElementTree(self.projectElement).write(filename, method='xml') |
|
93 | ElementTree(self.projectElement).write(filename, method='xml') | |
94 | print prettify(self.projectElement) |
|
94 | print prettify(self.projectElement) | |
95 |
|
95 | |||
96 | def readXml(self, filename): |
|
96 | def readXml(self, filename): | |
97 |
|
97 | |||
98 | #tree = ET.parse(filename) |
|
98 | #tree = ET.parse(filename) | |
99 | self.projectElement = None |
|
99 | self.projectElement = None | |
100 | tree = ElementTree(self.projectElement).parse(filename) |
|
100 | tree = ElementTree(self.projectElement).parse(filename) | |
101 |
|
101 | |||
102 | self.project = self.projectElement.tag |
|
102 | self.project = self.projectElement.tag | |
103 |
|
103 | |||
104 | self.id = self.projectElement.get('id') |
|
104 | self.id = self.projectElement.get('id') | |
105 | self.name = self.projectElement.get('name') |
|
105 | self.name = self.projectElement.get('name') | |
106 |
|
106 | |||
107 | readElement = self.projectElement.getiterator('readBranch') |
|
107 | readElement = self.projectElement.getiterator('readBranch') | |
108 |
|
108 | |||
109 | root = tree.getroot() |
|
109 | root = tree.getroot() | |
110 | self.project = root.tag |
|
110 | self.project = root.tag | |
111 | self.id = root.attrib.get('id') |
|
111 | self.id = root.attrib.get('id') | |
112 | self.name = root.attrib.get('name') |
|
112 | self.name = root.attrib.get('name') | |
113 |
|
113 | |||
114 | for description in root.findall('description'): |
|
114 | for description in root.findall('description'): | |
115 | description = description.get('description') |
|
115 | description = description.get('description') | |
116 |
|
116 | |||
117 | self.description= description |
|
117 | self.description= description | |
118 |
|
118 | |||
119 | for readBranch in root.findall('readBranch'): |
|
119 | for readBranch in root.findall('readBranch'): | |
120 | id = readBranch.get('id') |
|
120 | id = readBranch.get('id') | |
121 | self.idrb=id |
|
121 | self.idrb=id | |
122 |
|
122 | |||
123 | for procBranch in root.findall('procBranch'): |
|
123 | for procBranch in root.findall('procBranch'): | |
124 | id = readBranch.get('id') |
|
124 | id = readBranch.get('id') | |
125 | name = readBranch.get('name') |
|
125 | name = readBranch.get('name') | |
126 | self.idpb=id |
|
126 | self.idpb=id | |
127 | self.nameBranch=name |
|
127 | self.nameBranch=name | |
128 |
|
128 | |||
129 | root=tree.getroot() |
|
129 | root=tree.getroot() | |
130 | print root.tag , root.attrib |
|
130 | print root.tag , root.attrib | |
131 | for child in root: |
|
131 | for child in root: | |
132 | print child.tag ,child.attrib |
|
132 | print child.tag ,child.attrib | |
133 | for child in child: |
|
133 | for child in child: | |
134 | print child.tag ,child.attrib |
|
134 | print child.tag ,child.attrib | |
135 | for child in child: |
|
135 | for child in child: | |
136 | print child.tag ,child.attrib |
|
136 | print child.tag ,child.attrib | |
137 | for child in child: |
|
137 | for child in child: | |
138 | print child.tag ,child.attrib |
|
138 | print child.tag ,child.attrib | |
139 | # |
|
139 | # | |
140 | class ReadBranch(): |
|
140 | class ReadBranch(): | |
141 |
|
141 | |||
142 | id = None |
|
142 | id = None | |
143 | dpath = None |
|
143 | dpath = None | |
144 | dataformat = None |
|
144 | dataformat = None | |
145 | readMode = None |
|
145 | readMode = None | |
146 | startDate = None |
|
146 | startDate = None | |
147 | endDate = None |
|
147 | endDate = None | |
148 | startTime = None |
|
148 | startTime = None | |
149 | endTime = None |
|
149 | endTime = None | |
150 |
|
150 | |||
151 | def __init__(self, id, dpath, dataformat, readMode, startDate, endDate, startTime, endTime): |
|
151 | def __init__(self, id, dpath, dataformat, readMode, startDate, endDate, startTime, endTime): | |
152 |
|
152 | |||
153 | self.id = id |
|
153 | self.id = id | |
154 | self.dpath = dpath |
|
154 | self.dpath = dpath | |
155 | self.dataformat = dataformat |
|
155 | self.dataformat = dataformat | |
156 | self.readMode = readMode |
|
156 | self.readMode = readMode | |
157 | self.startDate = startDate |
|
157 | self.startDate = startDate | |
158 | self.endDate = endDate |
|
158 | self.endDate = endDate | |
159 | self.startTime = startTime |
|
159 | self.startTime = startTime | |
160 | self.endTime = endTime |
|
160 | self.endTime = endTime | |
161 |
|
161 | |||
162 | def makeXml(self, projectElement): |
|
162 | def makeXml(self, projectElement): | |
163 |
|
163 | |||
164 | readBranchElement = SubElement(projectElement, 'readBranch') |
|
164 | readBranchElement = SubElement(projectElement, 'readBranch') | |
165 | readBranchElement.set('id', str(self.id)) |
|
165 | readBranchElement.set('id', str(self.id)) | |
166 |
|
166 | |||
167 | se = SubElement(readBranchElement, 'parameter', name='dpath' , value=self.dpath) |
|
167 | se = SubElement(readBranchElement, 'parameter', name='dpath' , value=self.dpath) | |
168 | se = SubElement(readBranchElement, 'parameter', name='dataformat', value=self.dataformat) |
|
168 | se = SubElement(readBranchElement, 'parameter', name='dataformat', value=self.dataformat) | |
169 | se = SubElement(readBranchElement, 'parameter', name='startDate' , value=self.startDate) |
|
169 | se = SubElement(readBranchElement, 'parameter', name='startDate' , value=self.startDate) | |
170 | se = SubElement(readBranchElement, 'parameter', name='endDate' , value=self.endDate) |
|
170 | se = SubElement(readBranchElement, 'parameter', name='endDate' , value=self.endDate) | |
171 | se = SubElement(readBranchElement, 'parameter', name='startTime' , value=self.startTime) |
|
171 | se = SubElement(readBranchElement, 'parameter', name='startTime' , value=self.startTime) | |
172 | se = SubElement(readBranchElement, 'parameter', name='endTime' , value=self.endTime) |
|
172 | se = SubElement(readBranchElement, 'parameter', name='endTime' , value=self.endTime) | |
173 | se = SubElement(readBranchElement, 'parameter', name='readMode' , value=str(self.readMode)) |
|
173 | se = SubElement(readBranchElement, 'parameter', name='readMode' , value=str(self.readMode)) | |
174 |
|
174 | |||
175 |
|
175 | |||
176 | class ProcBranch(): |
|
176 | class ProcBranch(): | |
177 |
|
177 | |||
178 | id = None |
|
178 | id = None | |
179 | name = None |
|
179 | name = None | |
180 |
|
180 | |||
181 | upObjList = None |
|
181 | upObjList = None | |
182 |
|
182 | |||
183 | def __init__(self, id, name): |
|
183 | def __init__(self, id, name): | |
184 |
|
184 | |||
185 | self.id = id |
|
185 | self.id = id | |
186 | self.name = name |
|
186 | self.name = name | |
187 |
|
187 | |||
188 | self.upObjList = [] |
|
188 | self.upObjList = [] | |
189 |
|
189 | |||
190 | def addUP(self, name, type): |
|
190 | def addUP(self, name, type): | |
191 |
|
191 | |||
192 | id = len(self.upObjList) + 1 |
|
192 | id = len(self.upObjList) + 1 | |
193 |
|
193 | |||
194 | upObj = UPConf(id, name, type) |
|
194 | upObj = UPConf(id, name, type) | |
195 |
|
195 | |||
196 | self.upObjList.append(upObj) |
|
196 | self.upObjList.append(upObj) | |
197 |
|
197 | |||
198 | return upObj |
|
198 | return upObj | |
199 |
|
199 | |||
200 | def makeXml(self, projectElement): |
|
200 | def makeXml(self, projectElement): | |
201 |
|
201 | |||
202 | procBranchElement = SubElement(projectElement, 'procBranch') |
|
202 | procBranchElement = SubElement(projectElement, 'procBranch') | |
203 | procBranchElement.set('id', str(self.id)) |
|
203 | procBranchElement.set('id', str(self.id)) | |
204 | procBranchElement.set('name', self.name) |
|
204 | procBranchElement.set('name', self.name) | |
205 |
|
205 | |||
206 | for upObj in self.upObjList: |
|
206 | for upObj in self.upObjList: | |
207 | upObj.makeXml(procBranchElement) |
|
207 | upObj.makeXml(procBranchElement) | |
208 |
|
208 | |||
209 | class UPConf(): |
|
209 | class UPConf(): | |
210 |
|
210 | |||
211 | id = None |
|
211 | id = None | |
212 | name = None |
|
212 | name = None | |
213 | type = None |
|
213 | type = None | |
214 |
|
214 | |||
215 | opObjList = [] |
|
215 | opObjList = [] | |
216 |
|
216 | |||
217 | def __init__(self, id, name, type): |
|
217 | def __init__(self, id, name, type): | |
218 |
|
218 | |||
219 | self.id = id |
|
219 | self.id = id | |
220 | self.name = name |
|
220 | self.name = name | |
221 | self.type = type |
|
221 | self.type = type | |
222 |
|
222 | |||
223 | self.opObjList = [] |
|
223 | self.opObjList = [] | |
224 |
|
224 | |||
225 | def addOperation(self, name, priority, type='self'): |
|
225 | def addOperation(self, name, priority, type='self'): | |
226 |
|
226 | |||
227 | id = len(self.opObjList) + 1 |
|
227 | id = len(self.opObjList) + 1 | |
228 |
|
228 | |||
229 | opObj = OperationConf(id, name, priority, type) |
|
229 | opObj = OperationConf(id, name, priority, type) | |
230 |
|
230 | |||
231 | self.opObjList.append(opObj) |
|
231 | self.opObjList.append(opObj) | |
232 |
|
232 | |||
233 | return opObj |
|
233 | return opObj | |
234 |
|
234 | |||
235 | def makeXml(self, procBranchElement): |
|
235 | def makeXml(self, procBranchElement): | |
236 |
|
236 | |||
237 | upElement = SubElement(procBranchElement, 'UP') |
|
237 | upElement = SubElement(procBranchElement, 'UP') | |
238 | upElement.set('id', str(self.id)) |
|
238 | upElement.set('id', str(self.id)) | |
239 | upElement.set('name', self.name) |
|
239 | upElement.set('name', self.name) | |
240 | upElement.set('type', self.type) |
|
240 | upElement.set('type', self.type) | |
241 |
|
241 | |||
242 | for opObj in self.opObjList: |
|
242 | for opObj in self.opObjList: | |
243 | opObj.makeXml(upElement) |
|
243 | opObj.makeXml(upElement) | |
244 |
|
244 | |||
245 |
def getOperationObj |
|
245 | def getOperationObjList(self): | |
246 |
|
246 | |||
247 | return self.opObjList |
|
247 | return self.opObjList | |
248 |
|
248 | |||
249 | class OperationConf(): |
|
249 | class OperationConf(): | |
250 |
|
250 | |||
251 | id = 0 |
|
251 | id = 0 | |
252 | name = None |
|
252 | name = None | |
253 | priority = None |
|
253 | priority = None | |
254 | type = 'self' |
|
254 | type = 'self' | |
255 |
|
255 | |||
256 | parmObjList = [] |
|
256 | parmObjList = [] | |
257 |
|
257 | |||
258 | def __init__(self, id, name, priority, type): |
|
258 | def __init__(self, id, name, priority, type): | |
259 |
|
259 | |||
260 | self.id = id |
|
260 | self.id = id | |
261 | self.name = name |
|
261 | self.name = name | |
262 | self.priority = priority |
|
262 | self.priority = priority | |
263 | self.type = type |
|
263 | self.type = type | |
264 |
|
264 | |||
265 | self.parmObjList = [] |
|
265 | self.parmObjList = [] | |
266 |
|
266 | |||
267 | def addParameter(self, name, value): |
|
267 | def addParameter(self, name, value): | |
268 |
|
268 | |||
269 | id = len(self.parmObjList) + 1 |
|
269 | id = len(self.parmObjList) + 1 | |
270 |
|
270 | |||
271 | parmObj = ParameterConf(id, name, value) |
|
271 | parmObj = ParameterConf(id, name, value) | |
272 |
|
272 | |||
273 | self.parmObjList.append(parmObj) |
|
273 | self.parmObjList.append(parmObj) | |
274 |
|
274 | |||
275 | return parmObj |
|
275 | return parmObj | |
276 |
|
276 | |||
277 | def makeXml(self, upElement): |
|
277 | def makeXml(self, upElement): | |
278 |
|
278 | |||
279 | opElement = SubElement(upElement, 'Operation') |
|
279 | opElement = SubElement(upElement, 'Operation') | |
280 | opElement.set('id', str(self.id)) |
|
280 | opElement.set('id', str(self.id)) | |
281 | opElement.set('name', self.name) |
|
281 | opElement.set('name', self.name) | |
282 | opElement.set('priority', str(self.priority)) |
|
282 | opElement.set('priority', str(self.priority)) | |
283 |
|
283 | |||
284 | for parmObj in self.parmObjList: |
|
284 | for parmObj in self.parmObjList: | |
285 | parmObj.makeXml(opElement) |
|
285 | parmObj.makeXml(opElement) | |
286 |
|
286 | |||
287 |
def getParameterObj |
|
287 | def getParameterObjList(self): | |
288 |
|
288 | |||
289 | return self.parmObjList |
|
289 | return self.parmObjList | |
290 |
|
290 | |||
291 | class ParameterConf(): |
|
291 | class ParameterConf(): | |
292 |
|
292 | |||
293 | id = None |
|
293 | id = None | |
294 | name = None |
|
294 | name = None | |
295 | value = None |
|
295 | value = None | |
296 |
|
296 | |||
297 | def __init__(self, id, name, value): |
|
297 | def __init__(self, id, name, value): | |
298 |
|
298 | |||
299 | self.id = id |
|
299 | self.id = id | |
300 | self.name = name |
|
300 | self.name = name | |
301 | self.value = value |
|
301 | self.value = value | |
302 |
|
302 | |||
303 | def makeXml(self, opElement): |
|
303 | def makeXml(self, opElement): | |
304 |
|
304 | |||
305 | parmElement = SubElement(opElement, 'Parameter') |
|
305 | parmElement = SubElement(opElement, 'Parameter') | |
306 | parmElement.set('name', self.name) |
|
306 | parmElement.set('name', self.name) | |
307 | parmElement.set('value', self.value) |
|
307 | parmElement.set('value', self.value) | |
308 |
|
308 | |||
309 | def readXml(self, opElement): |
|
309 | def readXml(self, opElement): | |
310 |
|
310 | |||
311 |
|
311 | |||
312 | pass |
|
312 | pass | |
313 | # se = SubElement(parmElement, 'value')#ESTO ES LO ULTIMO QUE SE TRABAJO |
|
313 | # se = SubElement(parmElement, 'value')#ESTO ES LO ULTIMO QUE SE TRABAJO | |
314 | # se.text = self.value |
|
314 | # se.text = self.value | |
315 |
|
315 | |||
316 | if __name__ == '__main__': |
|
316 | if __name__ == '__main__': | |
317 |
|
317 | |||
318 | desc = "Este es un test" |
|
318 | desc = "Este es un test" | |
319 | filename = "test.xml" |
|
319 | filename = "test.xml" | |
320 |
|
320 | |||
321 | projectObj = Controller() |
|
321 | projectObj = Controller() | |
322 |
|
322 | |||
323 | projectObj.setParms(id = '11', name='test01', description=desc) |
|
323 | projectObj.setParms(id = '11', name='test01', description=desc) | |
324 |
|
324 | |||
325 | readBranchObj = projectObj.addReadBranch(dpath='mydata', dataformat='rawdata', readMode=0, startDate='1', endDate='3', startTime='4', endTime='5') |
|
325 | readBranchObj = projectObj.addReadBranch(dpath='mydata', dataformat='rawdata', readMode=0, startDate='1', endDate='3', startTime='4', endTime='5') | |
326 |
|
326 | |||
327 | procBranchObj = projectObj.addProcBranch(name='Branch1') |
|
327 | procBranchObj = projectObj.addProcBranch(name='Branch1') | |
328 |
|
328 | |||
329 | procBranchObj1 = projectObj.addProcBranch(name='Branch2') |
|
329 | procBranchObj1 = projectObj.addProcBranch(name='Branch2') | |
330 | upObj1 = procBranchObj.addUP(name='UP1', type='Voltage') |
|
330 | upObj1 = procBranchObj.addUP(name='UP1', type='Voltage') | |
331 | upObj2 = procBranchObj.addUP(name='UP2', type='Voltage') |
|
331 | upObj2 = procBranchObj.addUP(name='UP2', type='Voltage') | |
332 |
|
332 | |||
333 | opObj11 = upObj1.addOperation(name='removeDC', priority=1) |
|
333 | opObj11 = upObj1.addOperation(name='removeDC', priority=1) | |
334 | opObj11.addParameter(name='type', value='1') |
|
334 | opObj11.addParameter(name='type', value='1') | |
335 |
|
335 | |||
336 |
|
336 | |||
337 | opObj12 = upObj1.addOperation(name='decodification', priority=2) |
|
337 | opObj12 = upObj1.addOperation(name='decodification', priority=2) | |
338 | opObj12.addParameter(name='ncode', value='2') |
|
338 | opObj12.addParameter(name='ncode', value='2') | |
339 | opObj12.addParameter(name='nbauds', value='8') |
|
339 | opObj12.addParameter(name='nbauds', value='8') | |
340 | opObj12.addParameter(name='code1', value='001110011') |
|
340 | opObj12.addParameter(name='code1', value='001110011') | |
341 | opObj12.addParameter(name='code2', value='001110011') |
|
341 | opObj12.addParameter(name='code2', value='001110011') | |
342 |
|
342 | |||
343 | print "Escribiendo el XML" |
|
343 | print "Escribiendo el XML" | |
344 |
|
344 | |||
345 | projectObj.writeXml(filename) |
|
345 | projectObj.writeXml(filename) | |
346 |
|
346 | |||
347 | print "Leyendo el XML" |
|
347 | print "Leyendo el XML" | |
348 | projectObj.readXml(filename) |
|
348 | projectObj.readXml(filename) | |
349 | No newline at end of file |
|
349 |
General Comments 0
You need to be logged in to leave comments.
Login now