]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Common/TargetTxtClassObject.py
BaseTools: create and use a standard shared variable for '*'
[mirror_edk2.git] / BaseTools / Source / Python / Common / TargetTxtClassObject.py
index 0ba7725dd5b54e3cfba6df09fd9b7712c195f7b4..55a2f564821e11f6e10c1329e4a866c0ed457289 100644 (file)
 ##\r
 # Import Modules\r
 #\r
+from __future__ import print_function\r
+from __future__ import absolute_import\r
 import Common.LongFilePathOs as os\r
-import EdkLogger\r
-import DataType\r
-from BuildToolError import *\r
-import GlobalData\r
+from . import EdkLogger\r
+from . import DataType\r
+from .BuildToolError import *\r
+from . import GlobalData\r
 from Common.LongFilePathSupport import OpenLongFilePath as open\r
 \r
 gDefaultTargetTxtFile = "target.txt"\r
@@ -137,33 +139,6 @@ class TargetTxtClassObject(object):
         F.close()\r
         return 0\r
 \r
-    ## Print the dictionary\r
-    #\r
-    # Print all items of dictionary one by one\r
-    #\r
-    # @param Dict:  The dictionary to be printed\r
-    #\r
-    def printDict(Dict):\r
-        if Dict is not None:\r
-            KeyList = Dict.keys()\r
-            for Key in KeyList:\r
-                if Dict[Key] != '':\r
-                    print Key + ' = ' + str(Dict[Key])\r
-\r
-    ## Print the dictionary\r
-    #\r
-    # Print the items of dictionary which matched with input key\r
-    #\r
-    # @param list:  The dictionary to be printed\r
-    # @param key:   The key of the item to be printed\r
-    #\r
-    def printList(Key, List):\r
-        if type(List) == type([]):\r
-            if len(List) > 0:\r
-                if Key.find(TAB_SPLIT) != -1:\r
-                    print "\n" + Key\r
-                    for Item in List:\r
-                        print Item\r
 ## TargetTxtDict\r
 #\r
 # Load target.txt in input Conf dir\r
@@ -185,6 +160,6 @@ def TargetTxtDict(ConfDir):
 if __name__ == '__main__':\r
     pass\r
     Target = TargetTxtDict(os.getenv("WORKSPACE"))\r
-    print Target.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_MAX_CONCURRENT_THREAD_NUMBER]\r
-    print Target.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TARGET]\r
-    print Target.TargetTxtDictionary\r
+    print(Target.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_MAX_CONCURRENT_THREAD_NUMBER])\r
+    print(Target.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TARGET])\r
+    print(Target.TargetTxtDictionary)\r