20 # |
20 # |
21 # You should have received a copy of the GNU General Public License |
21 # You should have received a copy of the GNU General Public License |
22 # along with this program; if not, write to the Free Software |
22 # along with this program; if not, write to the Free Software |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
24 |
24 |
|
25 |
|
26 from __future__ import print_function |
25 import os |
27 import os |
26 import sys |
28 import sys |
27 import re |
29 import re |
28 import datetime |
30 import datetime |
29 from types import * |
31 from types import * |
1190 def PrintClasses(self): |
1192 def PrintClasses(self): |
1191 items = self.ComputedClasses.items() |
1193 items = self.ComputedClasses.items() |
1192 items.sort() |
1194 items.sort() |
1193 if self.FileName is not None: |
1195 if self.FileName is not None: |
1194 for filename, classes in items: |
1196 for filename, classes in items: |
1195 print "File '%s':" % filename |
1197 print("File '%s':" % filename) |
1196 class_items = classes.items() |
1198 class_items = classes.items() |
1197 class_items.sort() |
1199 class_items.sort() |
1198 for classname, xmlclass in class_items: |
1200 for classname, xmlclass in class_items: |
1199 print "%s: %s" % (classname, str(xmlclass)) |
1201 print("%s: %s" % (classname, str(xmlclass))) |
1200 else: |
1202 else: |
1201 for classname, xmlclass in items: |
1203 for classname, xmlclass in items: |
1202 print "%s: %s" % (classname, str(xmlclass)) |
1204 print("%s: %s" % (classname, str(xmlclass))) |
1203 |
1205 |
1204 def PrintClassNames(self): |
1206 def PrintClassNames(self): |
1205 classnames = self.XMLClassDefinitions.keys() |
1207 classnames = self.XMLClassDefinitions.keys() |
1206 classnames.sort() |
1208 classnames.sort() |
1207 for classname in classnames: |
1209 for classname in classnames: |
1208 print classname |
1210 print(classname) |
1209 |
1211 |
1210 |
1212 |
1211 def ComputeMultiplicity(name, infos): |
1213 def ComputeMultiplicity(name, infos): |
1212 """ |
1214 """ |
1213 Method that generate the method for generating the xml tree structure model by |
1215 Method that generate the method for generating the xml tree structure model by |