diff options
Diffstat (limited to 'BaseTools/Source/Python/Eot/CodeFragmentCollector.py')
-rw-r--r-- | BaseTools/Source/Python/Eot/CodeFragmentCollector.py | 61 |
1 files changed, 31 insertions, 30 deletions
diff --git a/BaseTools/Source/Python/Eot/CodeFragmentCollector.py b/BaseTools/Source/Python/Eot/CodeFragmentCollector.py index 87f179206d..1e30e2ce62 100644 --- a/BaseTools/Source/Python/Eot/CodeFragmentCollector.py +++ b/BaseTools/Source/Python/Eot/CodeFragmentCollector.py @@ -15,6 +15,7 @@ ##
# Import Modules
#
+from __future__ import print_function
import re
import Common.LongFilePathOs as os
import sys
@@ -379,49 +380,49 @@ class CodeFragmentCollector: #
def PrintFragments(self):
- print '################# ' + self.FileName + '#####################'
+ print('################# ' + self.FileName + '#####################')
- print '/****************************************/'
- print '/*************** ASSIGNMENTS ***************/'
- print '/****************************************/'
+ print('/****************************************/')
+ print('/*************** ASSIGNMENTS ***************/')
+ print('/****************************************/')
for asign in FileProfile.AssignmentExpressionList:
- print str(asign.StartPos) + asign.Name + asign.Operator + asign.Value
+ print(str(asign.StartPos) + asign.Name + asign.Operator + asign.Value)
- print '/****************************************/'
- print '/********* PREPROCESS DIRECTIVES ********/'
- print '/****************************************/'
+ print('/****************************************/')
+ print('/********* PREPROCESS DIRECTIVES ********/')
+ print('/****************************************/')
for pp in FileProfile.PPDirectiveList:
- print str(pp.StartPos) + pp.Content
+ print(str(pp.StartPos) + pp.Content)
- print '/****************************************/'
- print '/********* VARIABLE DECLARATIONS ********/'
- print '/****************************************/'
+ print('/****************************************/')
+ print('/********* VARIABLE DECLARATIONS ********/')
+ print('/****************************************/')
for var in FileProfile.VariableDeclarationList:
- print str(var.StartPos) + var.Modifier + ' '+ var.Declarator
+ print(str(var.StartPos) + var.Modifier + ' '+ var.Declarator)
- print '/****************************************/'
- print '/********* FUNCTION DEFINITIONS *********/'
- print '/****************************************/'
+ print('/****************************************/')
+ print('/********* FUNCTION DEFINITIONS *********/')
+ print('/****************************************/')
for func in FileProfile.FunctionDefinitionList:
- print str(func.StartPos) + func.Modifier + ' '+ func.Declarator + ' ' + str(func.NamePos)
+ print(str(func.StartPos) + func.Modifier + ' '+ func.Declarator + ' ' + str(func.NamePos))
- print '/****************************************/'
- print '/************ ENUMERATIONS **************/'
- print '/****************************************/'
+ print('/****************************************/')
+ print('/************ ENUMERATIONS **************/')
+ print('/****************************************/')
for enum in FileProfile.EnumerationDefinitionList:
- print str(enum.StartPos) + enum.Content
+ print(str(enum.StartPos) + enum.Content)
- print '/****************************************/'
- print '/*********** STRUCTS/UNIONS *************/'
- print '/****************************************/'
+ print('/****************************************/')
+ print('/*********** STRUCTS/UNIONS *************/')
+ print('/****************************************/')
for su in FileProfile.StructUnionDefinitionList:
- print str(su.StartPos) + su.Content
+ print(str(su.StartPos) + su.Content)
- print '/****************************************/'
- print '/************** TYPEDEFS ****************/'
- print '/****************************************/'
+ print('/****************************************/')
+ print('/************** TYPEDEFS ****************/')
+ print('/****************************************/')
for typedef in FileProfile.TypedefDefinitionList:
- print str(typedef.StartPos) + typedef.ToType
+ print(str(typedef.StartPos) + typedef.ToType)
##
#
@@ -430,4 +431,4 @@ class CodeFragmentCollector: #
if __name__ == "__main__":
- print "For Test."
+ print("For Test.")
|